Var accumulator class. More...
#include <var.hh>

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_ |
Var accumulator class.
Parameter T is the type of vectors
Definition at line 58 of file accu/stat/var.hh.
| 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] |
| 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] |
| typedef algebra::mat<dim,dim,float> mln::accu::stat::var< T >::result |
Reimplemented from mln::accu::internal::base< algebra::mat< T::dim, T::dim, float >, var< T > >.
Definition at line 63 of file accu/stat/var.hh.
| anonymous enum |
Definition at line 61 of file accu/stat/var.hh.
| mln::accu::stat::var< T >::var | ( | ) | [inline] |
Definition at line 110 of file accu/stat/var.hh.
References mln::accu::stat::var< T >::init().
| void mln::accu::stat::var< T >::init | ( | ) | [inline] |
Manipulators.
Definition at line 118 of file accu/stat/var.hh.
References mln::accu::stat::var< T >::cov_, mln::accu::stat::var< T >::n_, mln::algebra::mat< n, m, T >::set_all(), mln::algebra::vec< n, T >::set_all(), and mln::accu::stat::var< T >::sum_.
Referenced by mln::accu::stat::var< T >::var().
| 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_.
| 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.
| 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] |
| void mln::accu::stat::var< T >::take | ( | const argument & | v | ) | [inline] |
Definition at line 128 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().
| void mln::accu::stat::var< T >::take | ( | const var< T > & | other | ) | [inline] |
Definition at line 138 of file accu/stat/var.hh.
References mln::accu::stat::var< T >::cov_, and mln::accu::stat::var< T >::n_.
| 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 '_').
| void mln::accu::stat::var< T >::take_as_init_ | ( | const argument & | v | ) | [inline] |
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().
| 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".
| void mln::accu::stat::var< T >::take_n_times_ | ( | unsigned | n_times, | |
| const argument & | v | |||
| ) | [inline] |
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().
| 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.
| 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.
algebra::mat<dim,dim,float> mln::accu::stat::var< T >::cov_ [protected] |
Definition at line 101 of file accu/stat/var.hh.
Referenced by mln::accu::stat::var< T >::init(), mln::accu::stat::var< T >::take(), mln::accu::stat::var< T >::take_as_init_(), and mln::accu::stat::var< T >::take_n_times_().
unsigned mln::accu::stat::var< T >::n_ [protected] |
Definition at line 99 of file accu/stat/var.hh.
Referenced by mln::accu::stat::var< T >::init(), mln::accu::stat::var< T >::is_valid(), mln::accu::stat::var< T >::mean(), mln::accu::stat::var< T >::n_items(), mln::accu::stat::var< T >::take(), mln::accu::stat::var< T >::take_as_init_(), and mln::accu::stat::var< T >::take_n_times_().
algebra::vec<dim,float> mln::accu::stat::var< T >::sum_ [protected] |
Definition at line 100 of file accu/stat/var.hh.
Referenced by mln::accu::stat::var< T >::init(), mln::accu::stat::var< T >::mean(), mln::accu::stat::var< T >::take(), mln::accu::stat::var< T >::take_as_init_(), and mln::accu::stat::var< T >::take_n_times_().
1.7.1