$extrastylesheet
#include <mln/accu/math/sum.hh>
Public Member Functions | |
sum () | |
bool | is_valid () const |
const S & | subj_ () |
void | take_as_init (const T &t) |
void | take_n_times (unsigned n, const T &t) |
void | take_n_times_ (unsigned n, const T &t) |
const S & | to_result () const |
void | init () |
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_ |
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 |
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.
mln::accu::math::sum< T, S >::sum | ( | ) |
void mln::accu::math::sum< T, S >::init | ( | ) |
Manipulators.
bool mln::accu::math::sum< T, S >::is_valid | ( | ) | const |
Check whether this accu is able to return a result.
Always true here.
void mln::accu::math::sum< T, S >::set_value | ( | const S & | s | ) |
|
inherited |
void mln::accu::math::sum< T, S >::take | ( | const argument & | t | ) |
void mln::accu::math::sum< T, S >::take | ( | const sum< T, S > & | other | ) |
|
inherited |
Take as initialization the value t
.
void mln::accu::math::sum< T, S >::take_as_init_ | ( | const argument & | t | ) |
INTERNAL_API
Default implementation of "take as initialization".
Reimplemented from mln::Accumulator< sum< T, S > >.
|
inherited |
Take n
times the value t
.
|
inherited |
INTERNAL_API
Default implementation of "take n times".
const S& mln::accu::math::sum< T, S >::to_result | ( | ) | const |
Get the value of the accumulator.
void mln::accu::math::sum< T, S >::untake | ( | const argument & | t | ) |
void mln::accu::math::sum< T, S >::untake | ( | const sum< T, S > & | other | ) |
|
protected |
Definition at line 139 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.
|
inherited |
Definition at line 64 of file accumulator.hh.
|
inherited |