$extrastylesheet
#include <mln/accu/count_value.hh>
Public Member Functions | |
count_value () | |
count_value (const V &ref) | |
bool | is_valid () const |
unsigned | subj_ () |
void | take_as_init (const T &t) |
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) |
unsigned | to_result () const |
void | init () |
void | take (const argument &) |
void | take (const count_value< V > &other) |
void | untake (const argument &) |
void | untake (const count_value< V > &other) |
void | set_value (unsigned c) |
Protected Attributes | |
unsigned | count_ |
V | ref_ |
bool | valid_ |
Public Types | |
typedef V | argument |
typedef Accumulator< void > | category |
typedef count_value< V > | exact_t |
typedef unsigned | q_result |
typedef mln::metal::unqualif < unsigned >::ret | result |
Define an accumulator that counts the occurrence of a given value.
Definition at line 72 of file count_value.hh.
mln::accu::count_value< V >::count_value | ( | ) |
|
explicit |
void mln::accu::count_value< V >::init | ( | ) |
Manipulators.
bool mln::accu::count_value< V >::is_valid | ( | ) | const |
Check whether this accu is able to return a result.
Always true here.
void mln::accu::count_value< V >::set_value | ( | unsigned | c | ) |
Force the value of the counter to c.
|
inherited |
void mln::accu::count_value< V >::take | ( | const argument & | ) |
void mln::accu::count_value< V >::take | ( | const count_value< V > & | other | ) |
|
inherited |
Take as initialization the value t
.
|
inherited |
INTERNAL_API
Default implementation of "take as initialization".
|
inherited |
Take n
times the value t
.
|
inherited |
INTERNAL_API
Default implementation of "take n times".
unsigned mln::accu::count_value< V >::to_result | ( | ) | const |
Get the value of the accumulator.
void mln::accu::count_value< V >::untake | ( | const argument & | ) |
void mln::accu::count_value< V >::untake | ( | const count_value< V > & | other | ) |
|
protected |
The value of the counter.
Definition at line 101 of file count_value.hh.
|
protected |
The value which must be counted.
Definition at line 103 of file count_value.hh.
|
protected |
Set to false if the reference value is not set.
Definition at line 106 of file count_value.hh.
typedef V mln::accu::count_value< V >::argument |
Definition at line 75 of file count_value.hh.
|
inherited |
Definition at line 64 of file accumulator.hh.
|
inherited |
|
inherited |
|
inherited |