numeric
Public Member Functions | List of all members
numeric::Stats< T > Class Template Reference

#include <Stats.hpp>

Public Member Functions

 Stats ()
 
void update (T const &data, double weight=1.0)
 
void clear ()
 
min () const
 
max () const
 
mean () const
 
SquareType var () const
 
stdev () const
 
double sumWeights () const
 
size_t n () const
 
void setDDof (double new_ddof)
 
template<>
Stats< base::VectorXd >::SquareType var () const
 
template<>
base::VectorXd stdev () const
 

Detailed Description

template<class T>
class numeric::Stats< T >

Small helper class, which performs simple statistics on a stream of values. Internally only commulative data is stored, regardless on how many times you call update()

Constructor & Destructor Documentation

◆ Stats()

template<class T >
numeric::Stats< T >::Stats ( )

Member Function Documentation

◆ clear()

template<class T >
void numeric::Stats< T >::clear ( )

◆ max()

template<class T >
T numeric::Stats< T >::max ( ) const

◆ mean()

template<class T >
T numeric::Stats< T >::mean ( ) const

◆ min()

template<class T >
T numeric::Stats< T >::min ( ) const

◆ n()

template<class T >
size_t numeric::Stats< T >::n ( ) const

◆ setDDof()

template<class T>
void numeric::Stats< T >::setDDof ( double  new_ddof)
inline

Sets the delta for degrees of freedom, that is used to correct variance estimates.

var = 1 / (N-ddof) * sum(x_i - mean)^2

Default value is 0.

◆ stdev() [1/2]

template<class T >
T numeric::Stats< T >::stdev ( ) const

◆ stdev() [2/2]

template<>
base::VectorXd numeric::Stats< base::VectorXd >::stdev ( ) const
inline

◆ sumWeights()

template<class T >
double numeric::Stats< T >::sumWeights ( ) const

◆ update()

template<class T>
void numeric::Stats< T >::update ( T const &  data,
double  weight = 1.0 
)

◆ var() [1/2]

template<class T >
Stats< T >::SquareType numeric::Stats< T >::var ( ) const
inline

◆ var() [2/2]

template<>
Stats< base::VectorXd >::SquareType numeric::Stats< base::VectorXd >::var ( ) const
inline

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