Package gpl.whiten
Class InfiniteSortWithMean2
java.lang.Object
gpl.whiten.InfiniteSort
gpl.whiten.InfiniteSortWithMean2
Extension of InfiniteSort to also keep a running total of mean squared
values.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
addData
(double d) Add data to the sorted list.double
double
Methods inherited from class gpl.whiten.InfiniteSort
checkSort, getAutoInitialise, getCentralMean, getCentralMean, getData, getMedian, getnPoints, getSortedData, getSortInd, getTotalCalls, main, setAutoInitialise, setStop
-
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 classInfiniteSort
- 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
-