CFEL - ASG Software Suite
2.5.0
CASS
|
statistics calculator for a cummulative statistic More...
#include <statistics_calculator.hpp>
Public Types | |
typedef Type | value_type |
define the value type More... | |
typedef size_t | counter_type |
define the type of the counter More... | |
Public Member Functions | |
CummulativeStatisticsCalculator () | |
default constructor More... | |
void | addDatum (const value_type &datum) |
add a datum to the distribution More... | |
template<class InputIterator > | |
void | addDistribution (InputIterator first, InputIterator last) |
add a number of dati to the distribution More... | |
value_type | mean () const |
retrieve the mean of the distribution More... | |
value_type | variance () const |
retrieve the variance of the distribution More... | |
value_type | stdv () const |
retrieve the standart deviation of the distribution More... | |
value_type | sum () const |
retrieve the sum of all dati that have been added More... | |
counter_type | count () const |
retrieve the number of datum that have been added More... | |
void | reset () |
reset the statistics More... | |
Private Attributes | |
value_type | _sum |
the sum of all dati More... | |
value_type | _mean |
the current mean value More... | |
value_type | _tmp |
the current intermediate value that one calcs the stdv from More... | |
counter_type | _N |
counter to see how many values have been added to the statistics More... | |
statistics calculator for a cummulative statistic
This class is based on Knuths algorithm
Donald E. Knuth (1998). The Art of Computer Programming, volume 2: Seminumerical Algorithms, 3rd edn., p. 232. Boston: Addison-Wesley.
type | of the values for the average, defines the precision |
Definition at line 33 of file statistics_calculator.hpp.
typedef size_t cass::CummulativeStatisticsCalculator< Type >::counter_type |
define the type of the counter
Definition at line 40 of file statistics_calculator.hpp.
typedef Type cass::CummulativeStatisticsCalculator< Type >::value_type |
define the value type
Definition at line 37 of file statistics_calculator.hpp.
|
inline |
|
inline |
add a datum to the distribution
datum | The datum to be added |
Definition at line 55 of file statistics_calculator.hpp.
Referenced by cass::CummulativeStatisticsCalculator< value_type >::addDistribution(), and cass::pp204::getBoxStatistics().
|
inline |
add a number of dati to the distribution
Adds all elements between first and last to the distribution, but not the last
first | The first in the range to be added |
last | The element after last to be added |
Definition at line 73 of file statistics_calculator.hpp.
Referenced by cass::pp82::cummulativeStatistics(), and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().
|
inline |
retrieve the number of datum that have been added
Definition at line 120 of file statistics_calculator.hpp.
Referenced by cass::pp204::getBoxStatistics().
|
inline |
retrieve the mean of the distribution
Definition at line 84 of file statistics_calculator.hpp.
Referenced by cass::pp204::getBoxStatistics(), cass::pp82::loadSettings(), and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().
|
inline |
reset the statistics
Definition at line 126 of file statistics_calculator.hpp.
Referenced by cass::CummulativeStatisticsCalculator< value_type >::CummulativeStatisticsCalculator(), and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().
|
inline |
retrieve the standart deviation of the distribution
Definition at line 102 of file statistics_calculator.hpp.
Referenced by cass::pp204::getBoxStatistics(), cass::pp82::loadSettings(), and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().
|
inline |
retrieve the sum of all dati that have been added
Definition at line 111 of file statistics_calculator.hpp.
Referenced by cass::pp82::loadSettings().
|
inline |
retrieve the variance of the distribution
Definition at line 93 of file statistics_calculator.hpp.
Referenced by cass::pp82::loadSettings(), and cass::CummulativeStatisticsCalculator< value_type >::stdv().
|
private |
the current mean value
Definition at line 136 of file statistics_calculator.hpp.
Referenced by cass::CummulativeStatisticsCalculator< value_type >::addDatum(), cass::CummulativeStatisticsCalculator< value_type >::mean(), and cass::CummulativeStatisticsCalculator< value_type >::reset().
|
private |
counter to see how many values have been added to the statistics
Definition at line 142 of file statistics_calculator.hpp.
Referenced by cass::CummulativeStatisticsCalculator< value_type >::addDatum(), cass::CummulativeStatisticsCalculator< value_type >::count(), cass::CummulativeStatisticsCalculator< value_type >::reset(), and cass::CummulativeStatisticsCalculator< value_type >::variance().
|
private |
the sum of all dati
Definition at line 133 of file statistics_calculator.hpp.
Referenced by cass::CummulativeStatisticsCalculator< value_type >::addDatum(), cass::CummulativeStatisticsCalculator< value_type >::reset(), and cass::CummulativeStatisticsCalculator< value_type >::sum().
|
private |
the current intermediate value that one calcs the stdv from
Definition at line 139 of file statistics_calculator.hpp.
Referenced by cass::CummulativeStatisticsCalculator< value_type >::addDatum(), cass::CummulativeStatisticsCalculator< value_type >::reset(), and cass::CummulativeStatisticsCalculator< value_type >::variance().