public class Mean<N extends Number> extends MappedAccumulator<N>
Calculate the Arithmetic mean from a finite sample of N observations.
| Modifier and Type | Field and Description |
|---|---|
protected double |
_mean |
_samples| Constructor and Description |
|---|
Mean() |
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate(N value)
Accumulate the given value.
|
Mean<N> |
clone() |
boolean |
equals(Object obj) |
double |
getMean()
Return the mean value of the accumulated values.
|
double |
getStandardError()
Return the
Standard error
of the calculated mean.
|
int |
hashCode() |
String |
toString() |
getSamples, mapprotected double _mean
public Mean()
public double getMean()
Double.NaN
if getSamples() == 0.public double getStandardError()
public void accumulate(N value)
Accumulatoraccumulate in interface Accumulator<N extends Number>accumulate in class MappedAccumulator<N extends Number>value - the value to accumulate.NullPointerException - if the given value is null.public int hashCode()
hashCode in class MappedAccumulator<N extends Number>public boolean equals(Object obj)
equals in class MappedAccumulator<N extends Number>© 2007-2013 Franz Wilhelmstötter (2013-12-18 20:17)