Public Member Functions

mln::accu::math::count< T > Struct Template Reference
[On site sets]

Generic counter accumulator. More...

#include <count.hh>

Inherits base< unsigned, count< T > >.

List of all members.

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.

Detailed Description

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.


Member Function Documentation

template<typename T >
void mln::accu::math::count< T >::init (  )  [inline]

Manipulators.

Definition at line 145 of file count.hh.

template<typename T >
bool mln::accu::math::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 mln::accu::math::count< T >::set_value ( unsigned  c  )  [inline]

Force the value of the counter to c.

Definition at line 195 of file count.hh.

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 '_').

template<typename T >
unsigned mln::accu::math::count< T >::to_result (  )  const [inline]

Get the value of the accumulator.

Definition at line 187 of file count.hh.