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

#include <math/IncrementalMoments.h>

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

Classes

struct  Ctx
 

Public Member Functions

 IncrementalMoments ()
 
void reset ()
 
void insert (const T &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...
 
mean () const
 Returns the computed mean. More...
 

Protected Member Functions

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

Protected Attributes

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

◆ 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()

T mean ( ) const
inline

Returns the computed mean.

◆ _insert()

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

Member Data Documentation

◆ k

T k
protected

the cumulated weights

◆ m1

T m1
protected

the computed mean


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