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

#include <math/IncrementalMoments.h>

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

Classes

struct  Ctx
 

Public Types

typedef Eigen::Matrix< T, D, 1 > Vector
 
typedef Eigen::Matrix< T, D, D > Matrix
 

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

k
 the cumulated weights More...
 
Vector m1
 the computed mean More...
 

Member Typedef Documentation

◆ Vector

typedef Eigen::Matrix<T,D,1> Vector

◆ Matrix

typedef Eigen::Matrix<T,D,D> Matrix

Constructor & Destructor Documentation

◆ IncrementalMoments()

IncrementalMoments ( )
inline

Member Function Documentation

◆ reset()

void reset ( )
inline

◆ insert()

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

inserts a new sample

◆ sumWeight()

T sumWeight ( ) const
inline

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
inline

Returns the computed mean.

◆ _insert()

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

Member Data Documentation

◆ k

T k
protected

the cumulated weights

◆ m1

Vector m1
protected

the computed mean


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