Package Filters

Class AbstractFilter

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

public abstract class AbstractFilter extends 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    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

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface Filters.Filter

    getFilterDelay
  • Constructor Details

    • AbstractFilter

      public AbstractFilter()
  • Method Details

    • 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