Stores min, max and sum of values fed to it.
More...
#include <stats.hpp>
Stores min, max and sum of values fed to it.
Definition at line 17 of file stats.hpp.
qi::MinMaxSum::MinMaxSum |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 21 of file stats.hpp.
qi::MinMaxSum::MinMaxSum |
( |
float |
minValue, |
|
|
float |
maxValue, |
|
|
float |
cumulatedValue |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
minValue | Minimum value. |
maxValue | Maximum value. |
cumulatedValue | Sum of all value add to the class. |
Definition at line 28 of file stats.hpp.
std::string qi::MinMaxSum::asString |
( |
unsigned int |
count | ) |
const |
|
inline |
asString Get a string from min, max and cumulated.
- Parameters
-
count | Devide cumulated by count . |
- Returns
- A string with format (cumulated / count), min and max In this order separated by space.
Definition at line 65 of file stats.hpp.
const float& qi::MinMaxSum::cumulatedValue |
( |
| ) |
const |
|
inline |
Get sum of all value push value.
Definition at line 37 of file stats.hpp.
const float& qi::MinMaxSum::maxValue |
( |
| ) |
const |
|
inline |
Get maximum value.
Definition at line 35 of file stats.hpp.
const float& qi::MinMaxSum::minValue |
( |
| ) |
const |
|
inline |
Get minimum value.
Definition at line 33 of file stats.hpp.
void qi::MinMaxSum::push |
( |
float |
val, |
|
|
bool |
init = false |
|
) |
| |
|
inline |
Push a new value, process new min/max and add the value to cumulated.
- Parameters
-
val | New value. |
init | If true init min, max, cumulated to val |
Definition at line 43 of file stats.hpp.
void qi::MinMaxSum::reset |
( |
| ) |
|
|
inline |
Reset all three values to 0.
Definition at line 55 of file stats.hpp.
The documentation for this class was generated from the following file:
- /home/opennao/work/release-2.8/sdk/libqi/qi/stats.hpp