Public Member Functions

mln::accu::pair< A1, A2, T > Struct Template Reference
[Multiple accumulators]

Generic pair of accumulators. More...

#include <pair.hh>

Inheritance diagram for mln::accu::pair< A1, A2, T >:
Inheritance graph

List of all members.

Public Member Functions

A1::result first () const
 Return the result of the first accumulator.
A1 first_accu () const
 Return the first accumulator.
bool is_valid () const
 Check whether this accu is able to return a result.
A2::result second () const
 Return the result of the second accumulator.
A2 second_accu () const
 Return the second accumulator.
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.

void init ()
 Manipulators.

std::pair< typename A1::result,
typename A2::result > 
to_result () const
 Get the value of the accumulator.

Detailed Description

template<typename A1, typename A2, typename T = mln_argument(A1)>
struct mln::accu::pair< A1, A2, T >

Generic pair of accumulators.

The parameter T is the type of values.

Definition at line 58 of file pair.hh.


Member Function Documentation

template<typename A1 , typename A2 , typename T >
A1::result mln::accu::pair< A1, A2, T >::first (  )  const [inline]

Return the result of the first accumulator.

Definition at line 191 of file pair.hh.

template<typename A1 , typename A2 , typename T >
A1 mln::accu::pair< A1, A2, T >::first_accu (  )  const [inline]

Return the first accumulator.

Definition at line 209 of file pair.hh.

template<typename A1 , typename A2 , typename T >
void mln::accu::pair< A1, A2, T >::init (  )  [inline]

Manipulators.

Definition at line 136 of file pair.hh.

template<typename A1 , typename A2 , typename T >
bool mln::accu::pair< A1, A2, T >::is_valid (  )  const [inline]

Check whether this accu is able to return a result.

Always true here.

Definition at line 226 of file pair.hh.

template<typename A1 , typename A2 , typename T >
A2::result mln::accu::pair< A1, A2, T >::second (  )  const [inline]

Return the result of the second accumulator.

Definition at line 199 of file pair.hh.

template<typename A1 , typename A2 , typename T >
A2 mln::accu::pair< A1, A2, T >::second_accu (  )  const [inline]

Return the second accumulator.

Definition at line 217 of file pair.hh.

void mln::Accumulator< pair< A1, A2, 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< pair< A1, A2, 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 A1 , typename A2 , typename T >
std::pair< typename A1::result, typename A2::result > mln::accu::pair< A1, A2, T >::to_result (  )  const [inline]

Get the value of the accumulator.

Definition at line 172 of file pair.hh.