Public Types | Public Member Functions | Protected Attributes

mln::accu::stat::var< T > Struct Template Reference
[On values]

Var accumulator class. More...

#include <var.hh>

Inheritance diagram for mln::accu::stat::var< T >:
Inheritance graph

List of all members.

Public Types

enum  { dim = T::dim }
typedef T argument
typedef Accumulator< void > category
typedef var< T > exact_t
typedef algebra::vec< dim, float > mean_t
 Type equipment.
typedef algebra::mat< T::dim,
T::dim, float > 
q_result
typedef algebra::mat< dim, dim,
float > 
result

Public Member Functions

bool is_valid () const
 Check whether this accu returns a valid result.
mean_t mean () const
 Get the mean vector.
unsigned n_items () const
 Get the number of items.
algebra::mat< T::dim, T::dim,
float > 
subj_ ()
void take_as_init (const T &t)
 Take as initialization the value t.
void take_as_init_ (const T &t)
 Default implementation of "take as initialization".
void take_n_times (unsigned n, const T &t)
 Take n times the value t.
void take_n_times_ (unsigned n, const T &t)
 Default implementation of "take n times".
result to_result () const
 Get the accumulator result (the var value).
 var ()
result variance () const
 Get the variance matrix.

void init ()
 Manipulators.
void take (const argument &v)
void take (const var< T > &other)
void take_as_init_ (const argument &v)
void take_n_times_ (unsigned n_times, const argument &v)

Protected Attributes

algebra::mat< dim, dim, float > cov_
unsigned n_
algebra::vec< dim, float > sum_

Detailed Description

template<typename T>
struct mln::accu::stat::var< T >

Var accumulator class.

Parameter T is the type of vectors

Definition at line 58 of file accu/stat/var.hh.


Member Typedef Documentation

template<typename T>
typedef T mln::accu::stat::var< T >::argument

Definition at line 62 of file accu/stat/var.hh.

typedef Accumulator<void> mln::Accumulator< var< T > >::category [inherited]

Reimplemented from mln::Proxy< var< T > >.

Definition at line 80 of file accumulator.hh.

typedef var< T > mln::Object< var< T > >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename T>
typedef algebra::vec<dim,float> mln::accu::stat::var< T >::mean_t

Type equipment.

Definition at line 88 of file accu/stat/var.hh.

typedef algebra::mat< T::dim, T::dim, float > mln::accu::internal::base< algebra::mat< T::dim, T::dim, float > , var< T > >::q_result [inherited]

Definition at line 58 of file base.hh.

template<typename T>
typedef algebra::mat<dim,dim,float> mln::accu::stat::var< T >::result

Member Enumeration Documentation

template<typename T>
anonymous enum
Enumerator:
dim 

Definition at line 61 of file accu/stat/var.hh.


Constructor & Destructor Documentation

template<typename T >
mln::accu::stat::var< T >::var (  )  [inline]

Definition at line 110 of file accu/stat/var.hh.

References mln::accu::stat::var< T >::init().


Member Function Documentation

template<typename T >
void mln::accu::stat::var< T >::init (  )  [inline]
template<typename T >
bool mln::accu::stat::var< T >::is_valid (  )  const [inline]

Check whether this accu returns a valid result.

Definition at line 213 of file accu/stat/var.hh.

References mln::accu::stat::var< T >::n_.

template<typename T >
var< T >::mean_t mln::accu::stat::var< T >::mean (  )  const [inline]

Get the mean vector.

Definition at line 200 of file accu/stat/var.hh.

References mln::accu::stat::var< T >::n_, mln::accu::stat::var< T >::sum_, and mln::literal::zero.

template<typename T >
unsigned mln::accu::stat::var< T >::n_items (  )  const [inline]

Get the number of items.

Definition at line 192 of file accu/stat/var.hh.

References mln::accu::stat::var< T >::n_.

algebra::mat< T::dim, T::dim, float > mln::accu::internal::base< algebra::mat< T::dim, T::dim, float > , var< T > >::subj_ (  )  [inherited]
template<typename T >
void mln::accu::stat::var< T >::take ( const argument v  )  [inline]
template<typename T>
void mln::accu::stat::var< T >::take ( const var< T > &  other  )  [inline]
void mln::Accumulator< var< T > >::take_as_init ( const T &  t  )  [inherited]

Take as initialization the value t.

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

template<typename T >
void mln::accu::stat::var< T >::take_as_init_ ( const argument v  )  [inline]
void mln::Accumulator< var< T > >::take_as_init_ ( const T &  t  )  [inherited]

Default implementation of "take as initialization".

void mln::Accumulator< var< T > >::take_n_times ( unsigned  n,
const T &  t 
) [inherited]

Take n times the value t.

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

void mln::Accumulator< var< T > >::take_n_times_ ( unsigned  n,
const T &  t 
) [inherited]

Default implementation of "take n times".

template<typename T >
void mln::accu::stat::var< T >::take_n_times_ ( unsigned  n_times,
const argument v 
) [inline]
template<typename T >
var< T >::result mln::accu::stat::var< T >::to_result (  )  const [inline]

Get the accumulator result (the var value).

Definition at line 168 of file accu/stat/var.hh.

References mln::literal::zero.

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

Get the variance matrix.

Definition at line 184 of file accu/stat/var.hh.


Member Data Documentation

template<typename T>
algebra::mat<dim,dim,float> mln::accu::stat::var< T >::cov_ [protected]
template<typename T>
unsigned mln::accu::stat::var< T >::n_ [protected]
template<typename T>
algebra::vec<dim,float> mln::accu::stat::var< T >::sum_ [protected]