org.android.activityminer.logic.filter
Class NullFilter

Package class diagram package NullFilter
java.lang.Object
  extended by org.android.activityminer.logic.filter.NullFilter
All Implemented Interfaces:
LowPassFilter

public final class NullFilter
extends Object
implements LowPassFilter

Implementation of a null filter, which does just return the original signal.


Field Summary
static NullFilter NULLFILTER
          Global singleton null filter instance
 
Constructor Summary
private NullFilter()
          Constructor
 
Method Summary
 void apply(List<Double> x, List<Double> y, List<Double> z, List<Long> ts)
          Does apply this filter to an accelerometer time series stream.
 double[] lowPass(double[] x, double[] y, long currentTs)
          The filter function.
 void reset()
          Does reset the filter
 void setCutOffFrequency(double cf)
          Setter for the cut-off frequency
 void updateConfiguration(RuntimeConfiguration config)
          Does update the filter settings by the given configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULLFILTER

public static final NullFilter NULLFILTER
Global singleton null filter instance

Constructor Detail

NullFilter

private NullFilter()
Constructor

Method Detail

lowPass

public final double[] lowPass(double[] x,
                              double[] y,
                              long currentTs)
Description copied from interface: LowPassFilter
The filter function.

Specified by:
lowPass in interface LowPassFilter
Parameters:
x - the actual input signal
y - the last output signal
currentTs - the current time stamp
Returns:
the current output signal

apply

public final void apply(List<Double> x,
                        List<Double> y,
                        List<Double> z,
                        List<Long> ts)
Description copied from interface: LowPassFilter
Does apply this filter to an accelerometer time series stream.

Specified by:
apply in interface LowPassFilter
Parameters:
x - the x axis signal stream
y - the y axis signal stream
z - the z axis signal stream
ts - the time stamps

updateConfiguration

public final void updateConfiguration(RuntimeConfiguration config)
Description copied from interface: LowPassFilter
Does update the filter settings by the given configuration.

Specified by:
updateConfiguration in interface LowPassFilter
Parameters:
config - the configuration to update from.

reset

public void reset()
Description copied from interface: LowPassFilter
Does reset the filter

Specified by:
reset in interface LowPassFilter

setCutOffFrequency

public void setCutOffFrequency(double cf)
Description copied from interface: LowPassFilter
Setter for the cut-off frequency

Specified by:
setCutOffFrequency in interface LowPassFilter
Parameters:
cf - the cut-off frequencyy