MIRA
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IncrementalMoments< T, 1, 2 > Class Template Reference

#include <math/IncrementalMoments.h>

Inheritance diagram for IncrementalMoments< T, 1, 2 >:
Inheritance graph
[legend]

Public Member Functions

 IncrementalMoments ()
 
void reset ()
 
void insert (const T &x, T weight=T(1))
 inserts a new sample More...
 
var () const
 Returns the computed variance. More...
 
sumWeight () const
 Returns the sum of all sample weights, if all samples have the weight 1.0 this corresponds to the number of samples. More...
 
mean () const
 Returns the computed mean. More...
 

Protected Member Functions

void _insert (const T &x, T weight, Ctx &ctx)
 
void _insert (const T &x, T weight, Ctx &ctx)
 

Protected Attributes

m2
 the computed variance More...
 
k
 the cumulated weights More...
 
m1
 the computed mean More...
 

Constructor & Destructor Documentation

◆ IncrementalMoments()

IncrementalMoments ( )
inline

Member Function Documentation

◆ reset()

void reset ( )
inline

◆ insert()

void insert ( const T &  x,
weight = T(1) 
)
inline

inserts a new sample

◆ var()

T var ( ) const
inline

Returns the computed variance.

◆ _insert() [1/2]

void _insert ( const T &  x,
weight,
Ctx &  ctx 
)
inlineprotected

◆ sumWeight()

T sumWeight ( ) const
inlineinherited

Returns the sum of all sample weights, if all samples have the weight 1.0 this corresponds to the number of samples.

◆ mean()

T mean ( ) const
inlineinherited

Returns the computed mean.

◆ _insert() [2/2]

void _insert ( const T &  x,
weight,
Ctx &  ctx 
)
inlineprotectedinherited

Member Data Documentation

◆ m2

T m2
protected

the computed variance

◆ k

T k
protectedinherited

the cumulated weights

◆ m1

T m1
protectedinherited

the computed mean


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