Pol  Revision:cb584c9
Pol::Clib::OnlineStatistics Class Reference

#include <clib.h>

Public Member Functions

 OnlineStatistics ()
 
u64 count () const
 
double max () const
 
double mean () const
 
void update (double value)
 
double variance () const
 

Private Attributes

u64 _count
 
double _m2
 
double _max
 
double _mean
 

Detailed Description

Class to calculate online statistics: mean, variance and max ref Knuth

Definition at line 124 of file clib.h.

Constructor & Destructor Documentation

Pol::Clib::OnlineStatistics::OnlineStatistics ( )

Definition at line 14 of file clib_utils.cpp.

Member Function Documentation

u64 Pol::Clib::OnlineStatistics::count ( void  ) const

Definition at line 36 of file clib_utils.cpp.

References _count.

Referenced by Pol::Core::decay_single_thread().

double Pol::Clib::OnlineStatistics::max ( ) const

Definition at line 40 of file clib_utils.cpp.

References _max.

Referenced by Pol::Core::decay_single_thread().

double Pol::Clib::OnlineStatistics::mean ( ) const

Definition at line 32 of file clib_utils.cpp.

References _mean.

Referenced by Pol::Core::decay_single_thread().

void Pol::Clib::OnlineStatistics::update ( double  value)

Definition at line 16 of file clib_utils.cpp.

References _count, _m2, _max, and _mean.

Referenced by Pol::Core::decay_single_thread().

double Pol::Clib::OnlineStatistics::variance ( ) const

Definition at line 25 of file clib_utils.cpp.

References _count, and _m2.

Referenced by Pol::Core::decay_single_thread().

Member Data Documentation

u64 Pol::Clib::OnlineStatistics::_count
private

Definition at line 135 of file clib.h.

Referenced by count(), update(), and variance().

double Pol::Clib::OnlineStatistics::_m2
private

Definition at line 138 of file clib.h.

Referenced by update(), and variance().

double Pol::Clib::OnlineStatistics::_max
private

Definition at line 136 of file clib.h.

Referenced by max(), and update().

double Pol::Clib::OnlineStatistics::_mean
private

Definition at line 137 of file clib.h.

Referenced by mean(), and update().


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