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 E exact_t
typedef algebra::vec< dim, float > mean_t
 Type equipment.
typedef R 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.
subj_ ()
template<typename T>
void take_as_init (const T &t)
 Take as initialization the value t.
template<typename T>
void take_n_times (unsigned n, const T &t)
 Take n times the value t.
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 var< T > &other)
void take (const argument &v)
void take_as_init_ (const argument &v)
 Default implementation of "take as initialization".
void take_n_times_ (unsigned n_times, const argument &v)
 Default implementation of "take n times".

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.

template<typename E>
typedef Accumulator<void> mln::Accumulator< E >::category [inherited]

Reimplemented from mln::Proxy< E >.

Definition at line 80 of file accumulator.hh.

template<typename E>
typedef E mln::Object< E >::exact_t [inherited]

Definition at line 172 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.

template<typename R, typename E>
typedef R mln::accu::internal::base< R, E >::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

Reimplemented from mln::accu::internal::base< R, E >.

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


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_.

template<typename R, typename E>
R base::subj_ (  )  [inline, inherited]

Definition at line 77 of file base.hh.

References mln::exact().

template<typename T>
void mln::accu::stat::var< T >::take ( const var< T > &  other  )  [inline]

template<typename T>
void mln::accu::stat::var< T >::take ( const argument v  )  [inline]

template<typename E>
template<typename T>
void mln::Accumulator< E >::take_as_init ( const T &  t  )  [inline, inherited]

Take as initialization the value t.

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

Reimplemented in mln::accu::stat::variance< T, S, R >.

Definition at line 186 of file accumulator.hh.

References mln::exact(), and mln::mln_exact().

Referenced by mln::morpho::elementary::impl::gradient_on_function(), and mln::morpho::elementary::impl::gradient_on_function_fastest().

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

Default implementation of "take as initialization".

Reimplemented from mln::Accumulator< E >.

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

References mln::accu::stat::var< T >::cov_, mln::accu::stat::var< T >::n_, mln::accu::stat::var< T >::sum_, and mln::algebra::mat< n, m, T >::t().

template<typename E>
template<typename T>
void mln::Accumulator< E >::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 '_').

Definition at line 213 of file accumulator.hh.

References mln::exact(), and mln::mln_exact().

template<typename T>
void mln::accu::stat::var< T >::take_n_times_ ( unsigned  n,
const argument t 
) [inline]

Default implementation of "take n times".

Reimplemented from mln::Accumulator< E >.

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

References mln::accu::stat::var< T >::cov_, mln::accu::stat::var< T >::n_, mln::accu::stat::var< T >::sum_, and mln::algebra::mat< n, m, T >::t().

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

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.

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


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]


Generated on Sun Apr 25 01:57:43 2010 for Milena (Olena) by  doxygen 1.5.6