CFEL - ASG Software Suite
2.5.0
CASS
|
statistics calculator for a exponential moving statistics More...
#include <statistics_calculator.hpp>
Public Types | |
typedef Type | value_type |
define the value type More... | |
Public Member Functions | |
MovingStatisticsCalculator (unsigned int nAverages=200) | |
constructor More... | |
void | addDatum (const value_type &datum) |
add a datum 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... | |
void | reset () |
reset the statistics More... | |
void | nbrAverages (unsigned int nAverages) |
set the nbr of averages More... | |
Private Attributes | |
value_type | _mean |
the current mean value More... | |
value_type | _stdv |
the stdv value More... | |
value_type | _alpha |
how much should the current datum be weighted More... | |
bool | _firstdatum |
flag to see whether first datum is added More... | |
statistics calculator for a exponential moving statistics
The algorithms used by this class are based on a discussion found here: jttp://mathforum.org/kb/message.jspa?messageID=1637905
type | of the values for the average, defines the precision |
Definition at line 373 of file statistics_calculator.hpp.
typedef Type cass::MovingStatisticsCalculator< Type >::value_type |
define the value type
Definition at line 377 of file statistics_calculator.hpp.
|
inline |
constructor
nAverages | the last how many datums should have highest contribution to this. |
Definition at line 384 of file statistics_calculator.hpp.
References cass::CummulativeStatisticsNoOutlier< Type >::reset().
|
inline |
add a datum to the distribution
datum | The datum to be added |
Definition at line 394 of file statistics_calculator.hpp.
References cass::CummulativeStatisticsNoOutlier< Type >::_mean, cass::CummulativeStatisticsNoOutlier< Type >::_stdv, and cass::CummulativeStatisticsNoOutlier< Type >::mean().
|
inline |
retrieve the mean of the distribution
Definition at line 404 of file statistics_calculator.hpp.
References cass::CummulativeStatisticsNoOutlier< Type >::_mean.
|
inline |
set the nbr of averages
convert the nbr of averages to the alpha for the statistic calculation
nAverages | the last how many datums should have highest contribution to this. |
Definition at line 441 of file statistics_calculator.hpp.
|
inline |
reset the statistics
Definition at line 428 of file statistics_calculator.hpp.
References cass::CummulativeStatisticsNoOutlier< Type >::_mean, and cass::CummulativeStatisticsNoOutlier< Type >::_stdv.
|
inline |
retrieve the standart deviation of the distribution
Definition at line 422 of file statistics_calculator.hpp.
References cass::CummulativeStatisticsNoOutlier< Type >::stdv().
|
inline |
retrieve the variance of the distribution
Definition at line 413 of file statistics_calculator.hpp.
References cass::CummulativeStatisticsNoOutlier< Type >::_stdv.
|
private |
how much should the current datum be weighted
Definition at line 454 of file statistics_calculator.hpp.
|
private |
flag to see whether first datum is added
Definition at line 457 of file statistics_calculator.hpp.
|
private |
the current mean value
Definition at line 448 of file statistics_calculator.hpp.
|
private |
the stdv value
Definition at line 451 of file statistics_calculator.hpp.