#include <average.h>
Calculate an average value incrementally.
T | Type of the values (should be floating point). |
Public Member Functions | |
Average () | |
Create a new object to calculate an average. More... | |
void | add (T x) |
Add a value x to the set of numbers defining the average. More... | |
T | average () const |
uint64_t | number_of_values () const |
void | clear () |
Reset the average to 0. More... | |
Private Attributes | |
T | avg_ |
Average. More... | |
uint64_t | n_ |
Sample size. More... | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |