IncrementalAverage

Calculates the average using an accumulative technique (i.e, not all the values are provided at once). The struct doesn't store any previous values.

Members

Functions

addToAverage
void addToAverage(T value, ulong count)

Adds a new number (giving it an appropriate weight) to the average.

average
double average()
clear
void clear()

Resets the average incremental instance.

count
ulong count()
stdDeviation
double stdDeviation(double correction_factor)

Returns the standard deviation, a measure of the spread of a distribution to quantify the amount of variation or dispersion of a set of data values.

variance
double variance(double correction_factor)

Computes the variance, a measure of the spread of a distribution to quantify how far a set of data values is spread out.

Meta