Statistics Class Reference
Computes the rolling average, min, max, and standard deviation for a set of samples. More...
#include <TopicStatistics.hh>
Public Member Functions | |
Statistics ()=default | |
Default constructor. More... | |
~Statistics ()=default | |
Default destructor. More... | |
double | Avg () const |
Get the average value. More... | |
uint64_t | Count () const |
Get the number of samples. More... | |
double | Max () const |
Get the maximum sample value. More... | |
double | Min () const |
Get the minimum sample value. More... | |
double | StdDev () const |
Get the standard deviation. More... | |
void | Update (double _stat) |
Update with a new sample. More... | |
Detailed Description
Computes the rolling average, min, max, and standard deviation for a set of samples.
Constructor & Destructor Documentation
◆ Statistics()
|
default |
Default constructor.
◆ ~Statistics()
|
default |
Default destructor.
Member Function Documentation
◆ Avg()
double Avg | ( | ) | const |
Get the average value.
- Returns
- the average value.
◆ Count()
uint64_t Count | ( | ) | const |
Get the number of samples.
- Returns
- The number of samples.
◆ Max()
double Max | ( | ) | const |
Get the maximum sample value.
- Returns
- The maximum sample value.
◆ Min()
double Min | ( | ) | const |
Get the minimum sample value.
- Returns
- The minimum sample value.
◆ StdDev()
double StdDev | ( | ) | const |
Get the standard deviation.
- Returns
- The standard deviation.
◆ Update()
void Update | ( | double | _stat | ) |
Update with a new sample.
- Parameters
-
[in] _stat New statistic sample.
The documentation for this class was generated from the following file: