Class SlidingAverager

java.lang.Object
likelihoodDetectionModule.normalizer.SlidingAverager

public class SlidingAverager extends Object
A simple sliding block averager. The width is given in samples, and must be odd. If it is not odd, 1 is added to choose the next largest odd number. We wait until we have seen (n+1)/2 samples before we can output a data point, therefore this unit will cause some lag in the system as it buffers. As stated above, an initial (n+1)/2 data points are required before the first output point is produced. We make up the rest of the data by mirroring the data about the center point.
Author:
Dave Flogeras
  • Field Details

  • Constructor Details

    • SlidingAverager

      public SlidingAverager(int width, boolean divideThrough)
  • Method Details

    • getWidth

      public int getWidth()
    • consume

      public void consume(double[] data)