#include <statistics.hpp>
The Accumulator class calculates running statistics for a series of values.
- The storage requirements are constant.
- Each value that is given to the accumulator updates the statistics, but is itself discarded.
- Default constructed value is valid.
◆ count()
| uint64_t cloe::utility::Accumulator::count |
( |
| ) |
const |
|
inline |
Number of values accumulated.
◆ max()
| double cloe::utility::Accumulator::max |
( |
| ) |
const |
|
inline |
Maximum value encountered.
◆ mean()
| double cloe::utility::Accumulator::mean |
( |
| ) |
const |
|
inline |
Mean value across all values.
◆ min()
| double cloe::utility::Accumulator::min |
( |
| ) |
const |
|
inline |
Minimum value encountered.
◆ push_back()
| void cloe::utility::Accumulator::push_back |
( |
double |
x | ) |
|
|
inline |
Give the accumulator a new value to incorporate.
- The various statistics are updated internally.
◆ reset()
| void cloe::utility::Accumulator::reset |
( |
| ) |
|
|
inline |
Reset all values to their defaults.
- This can be useful if you want to reset the statistics after a warm-up phase.
◆ std_dev()
| double cloe::utility::Accumulator::std_dev |
( |
bool |
sample = false | ) |
const |
|
inline |
Sample or population (default) standard deviation.
- Is derived from the variance, hence the same rules apply for whether to use sample or population mode.
◆ variance()
| double cloe::utility::Accumulator::variance |
( |
bool |
sample = false | ) |
const |
|
inline |
Sample or population (default) variance.
The population variance is for approximating the true mean of a population of values, of which the series is a sample. The sample variance pertains only to the sample.
◆ to_json
Writes the JSON representation into j.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/cloe/checkouts/v0.24.0/runtime/include/cloe/utility/statistics.hpp