public class MutableUnivariateStatistics extends UnivariateStatistics
_mean, _meanSquare, _population| Constructor and Description |
|---|
MutableUnivariateStatistics()
Constructor with no samples.
|
MutableUnivariateStatistics(int size,
double average,
double averageSquare)
Primary Constructor with a starting set of statistics.
|
MutableUnivariateStatistics(UnivariateStatistics stats)
Copy constructor
|
MutableUnivariateStatistics(UnivariateStatistics stats,
double scale)
Constructor which scales the samples from an existing set of statistics.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSample(double value)
Add a new sample measurement.
|
void |
addSamples(UnivariateStatistics stats)
Merge in samples from other statistics.
|
void |
clear()
Clear the samples
|
void |
removeSample(double value)
Remove a sample from the statistics
|
void |
replaceSample(double oldValue,
double newValue)
Replace an old sample with a fresh sample.
|
void |
scaleData(double scale)
Modify the statistics for data of another scale.
|
mean, meanSquare, population, sampleStandardDeviation, sampleStandardDeviationOfMean, sampleVariance, sampleVarianceOfMean, standardDeviation, standardDeviationOfMean, variance, varianceOfMeanpublic MutableUnivariateStatistics()
public MutableUnivariateStatistics(UnivariateStatistics stats)
stats - the statistics to copypublic MutableUnivariateStatistics(UnivariateStatistics stats, double scale)
stats - the statistics against which to scalescale - factor which is used to scale the copied statisticspublic MutableUnivariateStatistics(int size,
double average,
double averageSquare)
size - the number of samplesaverage - the meanaverageSquare - the mean square of the samplespublic void clear()
public void addSample(double value)
value - The new sample measurementpublic void addSamples(UnivariateStatistics stats)
stats - the statistics which should be merged into these statisticspublic void replaceSample(double oldValue,
double newValue)
oldValue - the sample measurement to replacenewValue - the new sample measurementpublic void removeSample(double value)
value - the sample measurement to removepublic void scaleData(double scale)
scale - the amount by which to scale the existing sample measurements