Generic standard deviation accumulator class. More...
#include <deviation.hh>

Public Types | |
| typedef T | argument |
| typedef Accumulator< void > | category |
| typedef deviation< T, S, M > | exact_t |
| typedef M | q_result |
| typedef M | result |
Public Member Functions | |
| deviation (const T mean) | |
| bool | is_valid () const |
| Check whether this accu is able to return a result. | |
| operator M () const | |
| M | 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". | |
| M | to_result () const |
| Get the value of the accumulator. | |
| void | init () |
| Manipulators. | |
| void | take (const argument &t) |
| void | take (const deviation< T, S, M > &other) |
Protected Attributes | |
| accu::math::count< T > | count_ |
| T | mean_ |
| accu::math::sum< T, S > | sum_ |
Generic standard deviation accumulator class.
Parameter T is the type of values that we sum. Parameter S is the type to store the standard deviation; the default type of S is the summation type (property) of T. Parameter M is the type of the mean value; the default type of M is S.
| typedef T mln::accu::stat::deviation< T, S, M >::argument |
typedef Accumulator<void> mln::Accumulator< deviation< T, S, M > >::category [inherited] |
Reimplemented from mln::Proxy< deviation< T, S, M > >.
typedef deviation< T, S, M > mln::Object< deviation< T, S, M > >::exact_t [inherited] |
typedef M mln::accu::internal::base< M , deviation< T, S, M > >::q_result [inherited] |
| typedef M mln::accu::stat::deviation< T, S, M >::result |
Reimplemented from mln::accu::internal::base< M, deviation< T, S, M > >.
| mln::accu::stat::deviation< T, S, M >::deviation | ( | const T | mean | ) | [inline] |
| void mln::accu::stat::deviation< T, S, M >::init | ( | ) | [inline] |
Manipulators.
References mln::accu::stat::deviation< T, S, M >::count_, and mln::accu::stat::deviation< T, S, M >::sum_.
Referenced by mln::accu::stat::deviation< T, S, M >::deviation().
| bool mln::accu::stat::deviation< T, S, M >::is_valid | ( | ) | const [inline] |
Check whether this accu is able to return a result.
Always true here.
References mln::accu::stat::deviation< T, S, M >::count_.
| mln::accu::stat::deviation< T, S, M >::operator M | ( | ) | const [inline] |
| M mln::accu::internal::base< M , deviation< T, S, M > >::subj_ | ( | ) | [inherited] |
| void mln::accu::stat::deviation< T, S, M >::take | ( | const argument & | t | ) | [inline] |
| void mln::accu::stat::deviation< T, S, M >::take | ( | const deviation< T, S, M > & | other | ) | [inline] |
| void mln::Accumulator< deviation< T, S, M > >::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::Accumulator< deviation< T, S, M > >::take_as_init_ | ( | const T & | t | ) | [inherited] |
Default implementation of "take as initialization".
| void mln::Accumulator< deviation< T, S, M > >::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< deviation< T, S, M > >::take_n_times_ | ( | unsigned | n, | |
| const T & | t | |||
| ) | [inherited] |
Default implementation of "take n times".
| M mln::accu::stat::deviation< T, S, M >::to_result | ( | ) | const [inline] |
Get the value of the accumulator.
References mln::accu::stat::deviation< T, S, M >::count_, mln::math::sqrt(), and mln::accu::stat::deviation< T, S, M >::sum_.
Referenced by mln::accu::stat::deviation< T, S, M >::operator M().
accu::math::count<T> mln::accu::stat::deviation< T, S, M >::count_ [protected] |
T mln::accu::stat::deviation< T, S, M >::mean_ [protected] |
accu::math::sum<T,S> mln::accu::stat::deviation< T, S, M >::sum_ [protected] |
1.7.1