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

#include <math/IncrementalMoments.h>

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

Public Member Functions

 IncrementalMoments ()
 
void reset ()
 
void insert (const Vector &x, T weight=T(1))
 inserts a new sample More...
 
Matrix cov () const
 Returns the computed covariance. More...
 
T 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...
 
const Vector & mean () const
 Returns the computed mean. More...
 

Protected Member Functions

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

Protected Attributes

Matrix m2
 the computed covariance More...
 
T k
 the cumulated weights More...
 
Vector m1
 the computed mean More...
 

Constructor & Destructor Documentation

◆ IncrementalMoments()

IncrementalMoments ( )
inline

Member Function Documentation

◆ reset()

void reset ( )
inline

◆ insert()

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

inserts a new sample

◆ cov()

Matrix cov ( ) const
inline

Returns the computed covariance.

◆ _insert() [1/2]

void _insert ( const Vector &  x,
T  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()

const Vector& mean ( ) const
inlineinherited

Returns the computed mean.

◆ _insert() [2/2]

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

Member Data Documentation

◆ m2

Matrix m2
protected

the computed covariance

◆ k

T k
protectedinherited

the cumulated weights

◆ m1

Vector m1
protectedinherited

the computed mean


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