npstat::StatAccumulator Class Reference
Detailed DescriptionThis class calculates minimum value, maximum value, mean, and standard deviation for a set of observations. "mean" and "stdev" functions will cause a runtime exception to be thrown in case "accumulate" function was never called after the object was created (or after it was reset). This code updates a running average, so it should work better than a "naive" implementation. If you still need to improve the calculation of the standard deviation, use SampleAccumulator class which remembers all input points and performs a two-pass calculation. Member Function Documentation◆ accumulate() [1/4]
template<typename Numeric >
Accumulate a sample ◆ accumulate() [2/4]
Add the sample from another accumulator ◆ accumulate() [3/4]
Accumulate a product of a StatAccumulator times double ◆ accumulate() [4/4]
Main data accumulating function ◆ classId()
Method related to "geners" I/O ◆ count()
Number of observations processed so far ◆ location()
Standard plotting accessor ◆ max()
Maximum value in the processed sample ◆ mean()
Accumulated sample average ◆ meanUncertainty()
Uncertainty of the population mean ◆ min()
Minimum value in the processed sample ◆ noThrowMean()
Accumulated sample average. Will not throw an exception if no data is accumulated. Instead, the provided function argument will be returned. ◆ noThrowMeanUncertainty()
Uncertainty of the mean. Will not throw an exception if no data is accumulated. Instead, the provided function argument will be returned. ◆ noThrowStdev()
Standard deviation estimate. Will not throw an exception if no data is accumulated. Instead, the provided function argument will be returned. ◆ operator!=()
Logical negation of operator== ◆ operator*()
template<typename ConvertibleToLDouble >
Binary multiplication by a double ◆ operator*=()
template<typename ConvertibleToLongDouble >
The effect of "operator*=" is the same as if all values were multiplied by "r" for each "accumulate" call ◆ operator+()
Binary sum with another accumulator ◆ operator/()
template<typename ConvertibleToLDouble >
Binary division by a double ◆ operator/=()
template<typename ConvertibleToLongDouble >
The effect of "operator/=" is the same as if all values were divided by "r" for each "accumulate" call ◆ operator==()
Comparison for equality ◆ reset()
Clear all accumulators ◆ stdev()
Estimate of the population standard deviation ◆ sum()
Sum of all observations ◆ sumsq()
Accumulated sum of squares The documentation for this class was generated from the following file:
Generated by 1.9.1 |