$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::accu::stat::variance< T, S, R > Struct Template Reference

#include <mln/accu/stat/variance.hh>

Public Member Functions

 variance ()
bool is_valid () const
mean () const
unsigned n_items () const
standard_deviation () const
subj_ ()
sum () const
void take_as_init_ (const T &t)
void take_n_times (unsigned n, const T &t)
void take_n_times_ (unsigned n, const T &t)
to_result () const
var () const
void init ()
void take_as_init (const argument &t)
void take (const argument &t)
void take (const variance< T, S, R > &other)
void take (unsigned n_times, const argument &t)

Protected Attributes

unsigned n_
sum2_
sum_

Public Types

typedef T argument
typedef Accumulator< void > category
typedef variance< T, S, R > exact_t
typedef R q_result
typedef R result

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.

Definition at line 61 of file variance.hh.

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
void mln::accu::stat::variance< T, S, R >::init ( )

Manipulators.

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
bool mln::accu::stat::variance< T, S, R >::is_valid ( ) const

Check whether this accu is able to return a result.

Always true here.

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
R mln::accu::stat::variance< T, S, R >::mean ( ) const

Get the mean value.

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
unsigned mln::accu::stat::variance< T, S, R >::n_items ( ) const

Get the number of items.

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
R mln::accu::stat::variance< T, S, R >::standard_deviation ( ) const

Get the standard deviation value.

R mln::accu::internal::base< R, variance< T, S, R > >::subj_ ( )
inherited
template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
S mln::accu::stat::variance< T, S, R >::sum ( ) const

Get the sum value.

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
void mln::accu::stat::variance< T, S, R >::take ( const argument t)
template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
void mln::accu::stat::variance< T, S, R >::take ( const variance< T, S, R > &  other)
template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
void mln::accu::stat::variance< T, S, R >::take ( unsigned  n_times,
const argument t 
)
template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
void mln::accu::stat::variance< T, S, R >::take_as_init ( const argument t)

Take as initialization the value t.

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

void mln::Accumulator< variance< T, S, R > >::take_as_init_ ( const T t)
inherited

INTERNAL_API

Default implementation of "take as initialization".

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

Take n times the value t.

void mln::Accumulator< variance< T, S, R > >::take_n_times_ ( unsigned  n,
const T t 
)
inherited

INTERNAL_API

Default implementation of "take n times".

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
R mln::accu::stat::variance< T, S, R >::to_result ( ) const

Get the accumulator result (the variance value).

template<typename T, typename S = typename mln::value::props< T >::sum, typename R = S>
R mln::accu::stat::variance< T, S, R >::var ( ) const

Get the variance value.

Member Data Documentation

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

Definition at line 102 of file variance.hh.

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

Definition at line 103 of file variance.hh.

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

Definition at line 103 of file variance.hh.

Member Typedef Documentation

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

Definition at line 63 of file variance.hh.

typedef Accumulator<void> mln::Accumulator< variance< T, S, R > >::category
inherited

Definition at line 64 of file accumulator.hh.

typedef variance< T, S, R > mln::Object< variance< T, S, R > >::exact_t
inherited

Definition at line 105 of file object.hh.

typedef R mln::accu::internal::base< R, variance< T, S, R > >::q_result
inherited

Definition at line 58 of file base.hh.

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

Definition at line 64 of file variance.hh.