The Physiologist's Friend Simulation API

ch.unizh.ini.friend.simulation.filter
Class HighPassFilter

java.lang.Object
  extended by ch.unizh.ini.friend.simulation.filter.HighPassFilter
All Implemented Interfaces:
Filter

public class HighPassFilter
extends Object
implements Filter

A high-pass filter.

Version:
$Revision: 1.4 $
Author:
Christof Marti

Field Summary
protected  LowPassFilter lowPass
          The corresponding low-pass filter
 
Constructor Summary
HighPassFilter(float tau, float output)
          Creates a new instance of HighPassFilter with the given time constant and the given last output of the corresponding low-pass filter.
 
Method Summary
 float filter(float input, float dt)
          Returns the output of the filter based on the given input and the passed time.
 float getTau()
          Getter for property tau.
 void setTau(float tau)
          Setter for property tau.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lowPass

protected LowPassFilter lowPass
The corresponding low-pass filter

Constructor Detail

HighPassFilter

public HighPassFilter(float tau,
                      float output)
Creates a new instance of HighPassFilter with the given time constant and the given last output of the corresponding low-pass filter.

Parameters:
tau - The time constant.
output - The last output of the corresponding low-pass filter.
Method Detail

filter

public float filter(float input,
                    float dt)
Returns the output of the filter based on the given input and the passed time.

Specified by:
filter in interface Filter
Parameters:
input - The input value.
dt - The time step.
Returns:
The output of the filter.

getTau

public float getTau()
Getter for property tau.

Returns:
Value of property tau.

setTau

public void setTau(float tau)
Setter for property tau.

Parameters:
tau - New value of property tau.

http://www.ini.unizh.ch/~tobi/friend