yat  0.14.5pre
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
theplu::yat::statistics::Averager1 Class Reference

class to calculate mean More...

#include <yat/statistics/Averager1.h>

Inheritance diagram for theplu::yat::statistics::Averager1:
theplu::yat::statistics::averager_base< Averager1 >

Public Member Functions

 Averager1 (void)
 construct empty object
 
template<class Derived >
const Averager1operator+= (const averager_base< Derived > &rhs)
 plus and assign operator
 
void add (double x, long n=1)
 add a data point More...
 
double mean (void) const
 mean More...
 
long n (void) const
 number of data points More...
 
void rescale (double a)
 Rescales the object. More...
 
void reset (void)
 Reset object. More...
 
double sum_x (void) const
 

Protected Member Functions

void add1 (double x, long int n)
 
void add1 (double delta)
 
double rescale1 (double x)
 

Protected Attributes

long int n_
 
double mean_
 mean
 

Friends

class averager_base< Averager1 >
 

Detailed Description

class to calculate mean

Since
yat 0.9

Member Function Documentation

void theplu::yat::statistics::averager_base< Averager1 >::add ( double  x,
long  n = 1 
)
inlineinherited

add a data point

Adding n number of data point(s) with value x.

void theplu::yat::statistics::averager_base< Averager1 >::add1 ( double  x,
long int  n 
)
protectedinherited

add n data points with value x

void theplu::yat::statistics::averager_base< Averager1 >::add1 ( double  delta)
protectedinherited

add one data point with value delta + mean()

double theplu::yat::statistics::averager_base< Averager1 >::mean ( void  ) const
inlineinherited

mean

Returns
Mean of presented data, $ \frac{1}{n}\sum x_i $
long theplu::yat::statistics::averager_base< Averager1 >::n ( void  ) const
inlineinherited

number of data points

Returns
Number of data points
void theplu::yat::statistics::averager_base< Averager1 >::rescale ( double  a)
inlineinherited

Rescales the object.

$ \forall x_i \rightarrow a*x_i $,

double theplu::yat::statistics::averager_base< Averager1 >::rescale1 ( double  x)
protectedinherited

rescale as $ mean \rightarrow x mean $

void theplu::yat::statistics::averager_base< Averager1 >::reset ( void  )
inlineinherited

Reset object.

Restore Averager as if data were never added

double theplu::yat::statistics::averager_base< Averager1 >::sum_x ( void  ) const
inlineinherited
Returns
The sum of data values

Member Data Documentation

long int theplu::yat::statistics::averager_base< Averager1 >::n_
protectedinherited

number of data points


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

Generated on Tue Sep 26 2017 02:33:30 for yat by  doxygen 1.8.5