libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qi::MinMaxSum Class Reference

Stores min, max and sum of values fed to it. More...

#include <stats.hpp>

Public Member Functions

 MinMaxSum ()
 Default constructor. More...
 
 MinMaxSum (float minValue, float maxValue, float cumulatedValue)
 Constructor. More...
 
const float & minValue () const
 Get minimum value. More...
 
const float & maxValue () const
 Get maximum value. More...
 
const float & cumulatedValue () const
 Get sum of all value push value. More...
 
void push (float val, bool init=false)
 Push a new value, process new min/max and add the value to cumulated. More...
 
void reset ()
 Reset all three values to 0. More...
 
std::string asString (unsigned int count) const
 asString Get a string from min, max and cumulated. More...
 

Detailed Description

Stores min, max and sum of values fed to it.

Definition at line 17 of file stats.hpp.

Constructor & Destructor Documentation

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
minValueMinimum value.
maxValueMaximum value.
cumulatedValueSum of all value add to the class.

Definition at line 28 of file stats.hpp.

Member Function Documentation

std::string qi::MinMaxSum::asString ( unsigned int  count) const
inline

asString Get a string from min, max and cumulated.

Parameters
countDevide 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
valNew value.
initIf 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: