Generic sum accumulator class. More...
#include <sum.hh>

Public Types | |
| typedef T | argument |
| typedef Accumulator< void > | category |
| typedef sum< T, S > | exact_t |
| typedef const S & | q_result |
| typedef mln::metal::unqualif < const S & >::ret | result |
Public Member Functions | |
| bool | is_valid () const |
| Check whether this accu is able to return a result. | |
| const S & | subj_ () |
| sum () | |
| 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". | |
| const S & | to_result () const |
| Get the value of the accumulator. | |
| void | init () |
| Manipulators. | |
| void | take (const argument &t) |
| void | take_as_init_ (const argument &t) |
| void | take (const sum< T, S > &other) |
| void | untake (const argument &t) |
| void | untake (const sum< T, S > &other) |
| void | set_value (const S &s) |
Protected Attributes | |
| S | s_ |
Generic sum accumulator class.
Parameter T is the type of values that we sum. Parameter S is the type to store the value sum; the default type of S is the summation type (property) of T.
Definition at line 112 of file accu/math/sum.hh.
| typedef T mln::accu::math::sum< T, S >::argument |
Definition at line 114 of file accu/math/sum.hh.
typedef Accumulator<void> mln::Accumulator< sum< T, S > >::category [inherited] |
Reimplemented from mln::Proxy< sum< T, S > >.
Definition at line 80 of file accumulator.hh.
typedef sum< T, S > mln::Object< sum< T, S > >::exact_t [inherited] |
typedef const S & mln::accu::internal::base< const S & , sum< T, S > >::q_result [inherited] |
typedef mln::metal::unqualif< const S & >::ret mln::accu::internal::base< const S & , sum< T, S > >::result [inherited] |
| mln::accu::math::sum< T, S >::sum | ( | ) | [inline] |
Definition at line 153 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::init().
| void mln::accu::math::sum< T, S >::init | ( | ) | [inline] |
Manipulators.
Definition at line 161 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_, and mln::literal::zero.
Referenced by mln::accu::stat::deviation< T, S, M >::init(), and mln::accu::math::sum< T, S >::sum().
| bool mln::accu::math::sum< T, S >::is_valid | ( | ) | const [inline] |
Check whether this accu is able to return a result.
Always true here.
Definition at line 222 of file accu/math/sum.hh.
| void mln::accu::math::sum< T, S >::set_value | ( | const S & | s | ) | [inline] |
Definition at line 214 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_.
| const S & mln::accu::internal::base< const S & , sum< T, S > >::subj_ | ( | ) | [inherited] |
| void mln::accu::math::sum< T, S >::take | ( | const argument & | t | ) | [inline] |
Definition at line 168 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_.
Referenced by mln::registration::compute_distance_criteria(), and mln::accu::stat::deviation< T, S, M >::take().
| void mln::accu::math::sum< T, S >::take | ( | const sum< T, S > & | other | ) | [inline] |
Definition at line 190 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_.
| void mln::Accumulator< sum< T, S > >::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< sum< T, S > >::take_as_init_ | ( | const T & | t | ) | [inherited] |
Default implementation of "take as initialization".
| void mln::accu::math::sum< T, S >::take_as_init_ | ( | const argument & | t | ) | [inline] |
Definition at line 182 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_.
| void mln::Accumulator< sum< T, S > >::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< sum< T, S > >::take_n_times_ | ( | unsigned | n, | |
| const T & | t | |||
| ) | [inherited] |
Default implementation of "take n times".
| const S & mln::accu::math::sum< T, S >::to_result | ( | ) | const [inline] |
Get the value of the accumulator.
Definition at line 206 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_.
Referenced by mln::accu::stat::deviation< T, S, M >::to_result().
| void mln::accu::math::sum< T, S >::untake | ( | const sum< T, S > & | other | ) | [inline] |
Definition at line 198 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_.
| void mln::accu::math::sum< T, S >::untake | ( | const argument & | t | ) | [inline] |
Definition at line 175 of file accu/math/sum.hh.
References mln::accu::math::sum< T, S >::s_.
S mln::accu::math::sum< T, S >::s_ [protected] |
Definition at line 139 of file accu/math/sum.hh.
Referenced by mln::accu::math::sum< T, S >::init(), mln::accu::math::sum< T, S >::set_value(), mln::accu::math::sum< T, S >::take(), mln::accu::math::sum< T, S >::take_as_init_(), mln::accu::math::sum< T, S >::to_result(), and mln::accu::math::sum< T, S >::untake().
1.7.1