Generic counter accumulator.
More...
#include <count.hh>
Inherits mln::accu::internal::base< unsigned, count< T > >.
|
| 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.
|
| |
template<typename T>
struct mln::accu::math::count< T >
Generic counter accumulator.
The parameter T is the type to be count.
Definition at line 100 of file count.hh.
template<typename T >
| void count< T >::init |
( |
| ) |
|
|
inline |
template<typename T >
| bool count< T >::is_valid |
( |
| ) |
const |
|
inline |
Check whether this accu is able to return a result.
Always true here.
Definition at line 203 of file count.hh.
template<typename T >
| void count< T >::set_value |
( |
unsigned |
c | ) |
|
|
inline |
Force the value of the counter to c.
Definition at line 195 of file count.hh.
Take as initialization the value t.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
Take n times the value t.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
template<typename T >
| unsigned count< T >::to_result |
( |
| ) |
const |
|
inline |
Get the value of the accumulator.
Definition at line 187 of file count.hh.