|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.util.RunningStats
public class RunningStats
Calculates live values for the mean, variance and standard deviation of a set of samples. Not thread safe!
| Constructor Summary | |
|---|---|
RunningStats()
|
|
| Method Summary | |
|---|---|
void |
addSample(double sample)
Adds a new sample. |
double |
getMax()
Returns the maximum sample added or Double.NEGATIVE_INFINITY if no samples have
been added. |
double |
getMean()
|
double |
getMin()
Returns the minimum sample added or Double.POSITIVE_INFINITY if no samples have
been added. |
int |
getNumSamples()
|
double |
getStandardDeviation()
|
double |
getVariance()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RunningStats()
| Method Detail |
|---|
public void addSample(double sample)
public double getMin()
Double.POSITIVE_INFINITY if no samples have
been added.
public double getMax()
Double.NEGATIVE_INFINITY if no samples have
been added.
public double getVariance()
public int getNumSamples()
public double getMean()
public double getStandardDeviation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||