mln::accu::stat::variance< T, S, R > Struct Template Reference
[On values]

Variance accumulator class. More...

#include <variance.hh>

Inherits base< R, variance< T, S, R > >.

List of all members.

Public Member Functions

bool is_valid () const
 Check whether this accu is able to return a result.
mean () const
 Get the mean value.
unsigned n_items () const
 Get the number of items.
standard_deviation () const
 Get the standard deviation value.
sum () const
 Get the sum value.
void take_n_times (unsigned n, const T &t)
 Take n times the value t.
to_result () const
 Get the accumulator result (the variance value).
var () const
 Get the variance value.
void init ()
 Manipulators.
void take_as_init (const argument &t)
 Take as initialization the value t.


Detailed Description

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
struct mln::accu::stat::variance< T, S, R >

Variance accumulator class.

Parameter T is the type of values that we sum. Parameter S is the type to store the value sum and the sum of value * value; the default type of S is the summation type (property) of T. Parameter R is the type of the mean and variance values; the default type of R is S.


Member Function Documentation

template<typename T , typename S , typename R >
void mln::accu::stat::variance< T, S, R >::init (  )  [inline]

Manipulators.

template<typename T , typename S , typename R >
bool mln::accu::stat::variance< T, S, R >::is_valid (  )  const [inline]

Check whether this accu is able to return a result.

Always true here.

template<typename T , typename S , typename R >
R mln::accu::stat::variance< T, S, R >::mean (  )  const [inline]

Get the mean value.

template<typename T , typename S , typename R >
unsigned mln::accu::stat::variance< T, S, R >::n_items (  )  const [inline]

Get the number of items.

template<typename T , typename S , typename R >
R mln::accu::stat::variance< T, S, R >::standard_deviation (  )  const [inline]

template<typename T , typename S , typename R >
S mln::accu::stat::variance< T, S, R >::sum (  )  const [inline]

Get the sum value.

template<typename T , typename S , typename R >
void mln::accu::stat::variance< T, S, R >::take_as_init ( const argument &  t  )  [inline]

Take as initialization the value t.

Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').

Reimplemented from mln::Accumulator< variance< T, S, R > >.

void mln::Accumulator< variance< T, S, R > >::take_n_times ( unsigned  n,
const T &  t 
) [inline, inherited]

Take n times the value t.

Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').

template<typename T , typename S , typename R >
R mln::accu::stat::variance< T, S, R >::to_result (  )  const [inline]

template<typename T , typename S , typename R >
R mln::accu::stat::variance< T, S, R >::var (  )  const [inline]


Generated on Tue Jul 14 16:32:49 2009 for Milena (Olena) by  doxygen 1.5.9