Filters
Class AbstractFilter

java.lang.Object
  extended by Filters.AbstractFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
MovingAverageFilter

public abstract class AbstractFilter
extends java.lang.Object
implements Filter

Abstract implementation of Filter interface to provide common functionality for two of the main function calls for processing arrays of data.

Author:
Doug Gillespie

Constructor Summary
AbstractFilter()
           
 
Method Summary
abstract  void prepareFilter()
          Calculates the poles and zeros for the filter and sets up any memory buffers required during real time operation.
abstract  double runFilter(double data)
          Runs the filter on a single data value
 void runFilter(double[] inputData)
          Runs the filter on an array of data
 void runFilter(double[] inputData, double[] outputData)
          Runs the filter on an array of data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Filters.Filter
getFilterDelay
 

Constructor Detail

AbstractFilter

public AbstractFilter()
Method Detail

prepareFilter

public abstract void prepareFilter()
Description copied from interface: Filter
Calculates the poles and zeros for the filter and sets up any memory buffers required during real time operation.

Specified by:
prepareFilter in interface Filter

runFilter

public void runFilter(double[] inputData)
Description copied from interface: Filter
Runs the filter on an array of data

New values overwrite the old values in the array.

Specified by:
runFilter in interface Filter

runFilter

public void runFilter(double[] inputData,
                      double[] outputData)
Description copied from interface: Filter
Runs the filter on an array of data

New values write into the output data array.

Specified by:
runFilter in interface Filter

runFilter

public abstract double runFilter(double data)
Description copied from interface: Filter
Runs the filter on a single data value

Specified by:
runFilter in interface Filter
Returns:
New data value