Generic counter accumulator. More...
#include <count.hh>
Inherits base< unsigned, count< T > >.
Public Member Functions | |
bool | is_valid () const |
Check whether this accu is able to return a result. | |
void | take_as_init (const T &t) |
Take as initialization the value t . | |
void | take_n_times (unsigned n, const T &t) |
Take n times the value t . | |
unsigned | to_result () const |
Get the value of the accumulator. | |
void | init () |
Manipulators. | |
void | set_value (unsigned c) |
Force the value of the counter to c. |
Generic counter accumulator.
The parameter T is the type to be count.
Definition at line 100 of file count.hh.
void mln::accu::math::count< T >::init | ( | ) | [inline] |
bool mln::accu::math::count< T >::is_valid | ( | ) | const [inline] |
void mln::accu::math::count< T >::set_value | ( | unsigned | c | ) | [inline] |
void mln::Accumulator< count< 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::Accumulator< count< 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 '_').
unsigned mln::accu::math::count< T >::to_result | ( | ) | const [inline] |