Package gpl.whiten

Class InfiniteSortWithMean2

java.lang.Object
gpl.whiten.InfiniteSort
gpl.whiten.InfiniteSortWithMean2

public class InfiniteSortWithMean2 extends InfiniteSort
Extension of InfiniteSort to also keep a running total of mean squared values.
Author:
Doug Gillespie
  • Constructor Details

    • InfiniteSortWithMean2

      public InfiniteSortWithMean2(int nPoints)
  • Method Details

    • addData

      public double addData(double d)
      Description copied from class: InfiniteSort
      Add data to the sorted list. The oldest data point will drop off the list and the correct index of the new data point will be found. Data are always left in place (unsorted) in the data list and modifications are only to the sorted index data.
      Overrides:
      addData in class InfiniteSort
      Parameters:
      d - New data value.
      Returns:
      the value of the data removed from the list (i.e. the oldest value)
    • getMeanSq

      public double getMeanSq()
      Returns:
      The RMS value of data in the data list.
    • getTotalSq

      public double getTotalSq()
      Returns:
      the total Squared data