@Private
public class SampleStat
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
SampleStat.MinMax |
Helper to keep running min/max
|
| Constructor | Description |
|---|---|
SampleStat() |
Construct a new running sample stat
|
| Modifier and Type | Method | Description |
|---|---|---|
SampleStat |
add(double x) |
Add a sample the running stat.
|
SampleStat |
add(long nSamples,
double xTotal) |
Add some sample and a partial sum to the running stat.
|
void |
copyTo(SampleStat other) |
Copy the values to other (saves object creation and gc.)
|
double |
max() |
|
double |
mean() |
|
double |
min() |
|
long |
numSamples() |
|
void |
reset() |
|
double |
stddev() |
|
java.lang.String |
toString() |
|
double |
total() |
|
double |
variance() |
public void reset()
public void copyTo(SampleStat other)
other - the destination to hold our valuespublic SampleStat add(double x)
x - the sample numberpublic SampleStat add(long nSamples, double xTotal)
nSamples - number of samplesxTotal - the partial sumpublic long numSamples()
public double total()
public double mean()
public double variance()
public double stddev()
public double min()
public double max()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.