#include <cumulative_statistics.hpp>
Public Member Functions | |
void | clear () |
CumulativeStatistics () | |
T | mean () const |
Current cumulative calculation of mean. More... | |
void | push_back (const T &x) |
T | size () const |
T | variance () const |
Current cumulative calculation of variance. More... | |
Private Attributes | |
T | new_mean |
T | new_variance |
T | number_of_data |
T | old_mean |
T | old_variance |
Calculate cumulative mean and variance (i.e. without storage).
Definition at line 41 of file cumulative_statistics.hpp.
|
inline |
Definition at line 43 of file cumulative_statistics.hpp.
|
inline |
Definition at line 45 of file cumulative_statistics.hpp.
|
inline |
Current cumulative calculation of mean.
Definition at line 83 of file cumulative_statistics.hpp.
|
inline |
Catch the new data and update the cumulative calculations.
TODO it uses a float as a counter to increase the longevity of the cumulative calculation, however it really ought to handle the number_of_data rolling over problem.
x | : new data |
Definition at line 55 of file cumulative_statistics.hpp.
|
inline |
Number of data used for statistics
Definition at line 77 of file cumulative_statistics.hpp.
|
inline |
Current cumulative calculation of variance.
Definition at line 89 of file cumulative_statistics.hpp.
|
private |
Definition at line 94 of file cumulative_statistics.hpp.
|
private |
Definition at line 94 of file cumulative_statistics.hpp.
|
private |
Definition at line 92 of file cumulative_statistics.hpp.
|
private |
Definition at line 93 of file cumulative_statistics.hpp.
|
private |
Definition at line 93 of file cumulative_statistics.hpp.