public class Stats extends Object
Constructor and Description |
---|
Stats()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(double x)
Adds a value and updates the statistics.
|
void |
combine(Stats o)
Combines the statistics for another sample into this.
|
double |
getMax()
Returns the greatest value of the sample.
|
double |
getMean()
Returns the mean of the sample.
|
double |
getMin()
Returns the smallest value of the sample.
|
long |
getN()
Returns the size of the sample.
|
double |
getStandardDeviation()
Returns the standard deviation of the sample.
|
double |
getVariance()
Returns the variance of the sample.
|
void |
reset()
Resets the Stats object (as it had just been created).
|
public void accept(double x)
x
- value to be addedpublic void combine(Stats o)
o
- statistics of other samplepublic long getN()
public double getMean()
public double getVariance()
public double getStandardDeviation()
public double getMax()
public double getMin()
public void reset()
Copyright © 2016. All rights reserved.