senf::StatisticAccumulator< T > Class Template Reference
[Statistics]

Accumulate measurement values. More...

#include <senf/Utils/StatisticAccumulator.hh>

List of all members.


Detailed Description

template<class T>
class senf::StatisticAccumulator< T >

Accumulate measurement values.

The accumulator mainly do the prelimenary work for the senf::Statistic class. It accumulates certain values with in an interval to be used by senf::Statistics

This class provides the average, standard deviation, min, max values over one interval, means until clear() is called. It rather directly calculates the results then collection all single values provided by calling accumulate().
See also:
senf::Statistics to process accumulated values

Definition at line 69 of file StatisticAccumulator.hh.


Public Member Functions

  StatisticAccumulator ()
void  clear ()
  Reset accumulated values.
void  accumulate (T value)
  Gather value to be accumulated.
void  setLastAvg (T value)
  If no real data was collected, this method specifies the min/avg/max value to be returned.
min () const
  Returns current minimal value.
max () const
  Returns current maximal value.
float  avg () const
  Returns average value.
float  last_avg () const
  Returns former average value.
float  stddev () const
  Returns standard deviation value.
boost::uint32_t  count () const
  Returns count of accumulated values.
void  data (StatisticsData &data_) const
  Returns the accumulated data as a tuple.

Constructor & Destructor Documentation

template<class T >
senf::StatisticAccumulator< T >::
StatisticAccumulator ()

Definition at line 35 of file StatisticAccumulator.ct.


Member Function Documentation

template<class T >
void senf::StatisticAccumulator< T >::
accumulate ( value )

Gather value to be accumulated.

This method accumulates a value.

Parameters:
[in]  value  to be accumulated value

Definition at line 70 of file StatisticAccumulator.ct.

template<class T >
float senf::StatisticAccumulator< T >::
avg ()

Returns average value.

This method returns the average value of the current accumulation.

Definition at line 50 of file StatisticAccumulator.cti.

template<class T >
void senf::StatisticAccumulator< T >::
clear ()

Reset accumulated values.

This member reset all values.

Definition at line 88 of file StatisticAccumulator.ct.

template<class T >
boost::uint32_t senf::StatisticAccumulator< T >::
count ()

Returns count of accumulated values.

This method returns count of accumulated values of the current accumulation.

Definition at line 70 of file StatisticAccumulator.cti.

template<class T >
void senf::StatisticAccumulator< T >::
data ( StatisticsData data_ )

Returns the accumulated data as a tuple.

This method returns the accumulated information as a tuple.

Definition at line 99 of file StatisticAccumulator.ct.

template<class T >
float senf::StatisticAccumulator< T >::
last_avg ()

Returns former average value.

This method returns the average value of the former accumulation period.

Definition at line 63 of file StatisticAccumulator.cti.

template<class T >
T senf::StatisticAccumulator< T >::
max ()

Returns current maximal value.

This method returns the maximal value of the current accumulation.

Definition at line 43 of file StatisticAccumulator.cti.

template<class T >
T senf::StatisticAccumulator< T >::
min ()

Returns current minimal value.

This method returns the minimal value of the current accumulation.

Definition at line 36 of file StatisticAccumulator.cti.

template<class T >
void senf::StatisticAccumulator< T >::
setLastAvg ( value )

If no real data was collected, this method specifies the min/avg/max value to be returned.

This method specifies the the min/avg/max value to be returned if no real data was colelcted

Parameters:
[in]  value  to be returned

Definition at line 64 of file StatisticAccumulator.ct.

template<class T >
float senf::StatisticAccumulator< T >::
stddev ()

Returns standard deviation value.

This method returns the standard deviation value of the current accumulation.

Definition at line 50 of file StatisticAccumulator.ct.


The documentation for this class was generated from the following files: