public class MovingStatistics
extends java.lang.Object
Constructor and Description |
---|
MovingStatistics(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
add(double x)
Adds a new sample to the statistics, possibly also removing the oldest.
|
void |
clear()
Resets the statistics to an empty state
|
int |
getCount()
Returns the current number of samples
|
double |
getMean()
Returns the mean of the current set of samples
|
double |
getStandardDeviation()
Returns the sample standard deviation of the current set of samples
|
double |
getVariance()
Returns the sample variance of the current set of samples
|
public int getCount()
public double getMean()
public double getVariance()
public double getStandardDeviation()
public void clear()
public void add(double x)
x
- the sample to add