$extrastylesheet
#include <mln/accu/maj_h.hh>
Public Member Functions | |
maj_h () | |
const accu::histo< T > & | histo () const |
bool | is_valid () const |
const T & | 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) |
const T & | to_result () const |
void | update_ () const |
void | init () |
void | take (const argument &t) |
void | untake (const argument &t) |
void | take (const maj_h< T > &other) |
Public Attributes | |
bool | valid_ |
Protected Attributes | |
accu::histo< T > | h_ |
argument | t_ |
Public Types | |
typedef T | argument |
typedef Accumulator< void > | category |
typedef maj_h< T > | exact_t |
typedef const T & | q_result |
typedef mln::metal::unqualif < const T & >::ret | result |
Compute the majority value.
It is based on a histogram. The parameter T
is the type of values.
mln::accu::maj_h< T >::maj_h | ( | ) |
const accu::histo<T>& mln::accu::maj_h< T >::histo | ( | ) | const |
void mln::accu::maj_h< T >::init | ( | ) |
Manipulators.
bool mln::accu::maj_h< T >::is_valid | ( | ) | const |
Check whether this accu is able to return a result.
Always true here.
|
inherited |
void mln::accu::maj_h< T >::take | ( | const argument & | t | ) |
void mln::accu::maj_h< T >::take | ( | const maj_h< T > & | 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".
const T& mln::accu::maj_h< T >::to_result | ( | ) | const |
Get the value of the accumulator.
void mln::accu::maj_h< T >::untake | ( | const argument & | t | ) |
void mln::accu::maj_h< T >::update_ | ( | ) | const |
|
mutableprotected |
|
mutableprotected |
|
mutable |
typedef T mln::accu::maj_h< T >::argument |
|
inherited |
Definition at line 64 of file accumulator.hh.
|
inherited |
|
inherited |