Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

mln::accu::internal::couple< A1, A2, R, E > Struct Template Reference

Base implementation of a couple of accumulators. More...

#include <couple.hh>

Inheritance diagram for mln::accu::internal::couple< A1, A2, R, E >:
Inheritance graph

List of all members.

Public Types

typedef Accumulator< void > category
typedef E exact_t
typedef R q_result
typedef mln::metal::unqualif
< R >::ret 
result

Public Member Functions

A1 & first ()
const A1 & first () const
bool is_valid () const
 Check whether this accu is able to return a result.
typedef mln_argument (A1) argument
A2 & second ()
const A2 & second () const
subj_ ()
template<typename T >
void take_as_init (const T &t)
 Take as initialization the value t.
template<typename T >
void take_as_init_ (const T &t)
 Default implementation of "take as initialization".
template<typename T >
void take_n_times (unsigned n, const T &t)
 Take n times the value t.
template<typename T >
void take_n_times_ (unsigned n, const T &t)
 Default implementation of "take n times".

void init ()
 Manipulators.
void take_as_init (const argument &t)
void take (const argument &t)
void take (const E &other)

Protected Member Functions

 couple ()

Protected Attributes

A1 a1_
A2 a2_

Detailed Description

template<typename A1, typename A2, typename R, typename E>
struct mln::accu::internal::couple< A1, A2, R, E >

Base implementation of a couple of accumulators.

The parameter T is the type of values.

Todo:
Check that, when T is not provided, A1 and A2 have the same value.

Definition at line 56 of file accu/internal/couple.hh.


Member Typedef Documentation

template<typename E>
typedef Accumulator<void> mln::Accumulator< E >::category [inherited]

Reimplemented from mln::Proxy< E >.

Definition at line 80 of file accumulator.hh.

template<typename E>
typedef E mln::Object< E >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename R, typename E>
typedef R mln::accu::internal::base< R, E >::q_result [inherited]

Reimplemented in mln::accu::stat::histo3d_rgb< V >.

Definition at line 58 of file base.hh.

template<typename R, typename E>
typedef mln::metal::unqualif< R >::ret mln::accu::internal::base< R, E >::result [inherited]

Constructor & Destructor Documentation

template<typename A1 , typename A2 , typename R , typename E >
mln::accu::internal::couple< A1, A2, R, E >::couple (  )  [inline, protected]

Member Function Documentation

template<typename A1 , typename A2 , typename R , typename E >
A1 & mln::accu::internal::couple< A1, A2, R, E >::first (  )  [inline]
template<typename A1 , typename A2 , typename R , typename E >
const A1 & mln::accu::internal::couple< A1, A2, R, E >::first (  )  const [inline]
template<typename A1 , typename A2 , typename R , typename E >
void mln::accu::internal::couple< A1, A2, R, E >::init (  )  [inline]
template<typename A1 , typename A2 , typename R , typename E >
bool mln::accu::internal::couple< A1, A2, R, E >::is_valid (  )  const [inline]

Check whether this accu is able to return a result.

Always true here.

Definition at line 135 of file accu/internal/couple.hh.

References mln::accu::internal::couple< A1, A2, R, E >::a1_, and mln::accu::internal::couple< A1, A2, R, E >::a2_.

template<typename A1, typename A2, typename R, typename E>
typedef mln::accu::internal::couple< A1, A2, R, E >::mln_argument ( A1   ) 
template<typename A1 , typename A2 , typename R , typename E >
A2 & mln::accu::internal::couple< A1, A2, R, E >::second (  )  [inline]
template<typename A1 , typename A2 , typename R , typename E >
const A2 & mln::accu::internal::couple< A1, A2, R, E >::second (  )  const [inline]
template<typename R , typename E >
R base::subj_ (  )  [inline, inherited]

Definition at line 77 of file base.hh.

References mln::exact().

template<typename A1 , typename A2 , typename R , typename E >
void mln::accu::internal::couple< A1, A2, R, E >::take ( const argument &  t  )  [inline]
template<typename A1 , typename A2 , typename R , typename E>
void mln::accu::internal::couple< A1, A2, R, E >::take ( const E &  other  )  [inline]
template<typename E >
template<typename T >
void mln::Accumulator< E >::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 '_').

Definition at line 186 of file accumulator.hh.

References mln::exact(), and mln::mln_exact().

Referenced by mln::morpho::elementary::impl::gradient_on_function(), and mln::morpho::elementary::impl::gradient_on_function_fastest().

template<typename A1 , typename A2 , typename R , typename E >
void mln::accu::internal::couple< A1, A2, R, E >::take_as_init ( const argument &  t  )  [inline]
template<typename E >
template<typename T >
void mln::Accumulator< E >::take_as_init_ ( const T &  t  )  [inherited]

Default implementation of "take as initialization".

Definition at line 200 of file accumulator.hh.

References mln::exact().

template<typename E >
template<typename T >
void mln::Accumulator< E >::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 '_').

Definition at line 213 of file accumulator.hh.

References mln::exact(), and mln::mln_exact().

template<typename E >
template<typename T >
void mln::Accumulator< E >::take_n_times_ ( unsigned  n,
const T &  t 
) [inherited]

Default implementation of "take n times".

Definition at line 230 of file accumulator.hh.

References mln::exact().


Member Data Documentation

template<typename A1, typename A2, typename R, typename E>
A1 mln::accu::internal::couple< A1, A2, R, E >::a1_ [protected]
template<typename A1, typename A2, typename R, typename E>
A2 mln::accu::internal::couple< A1, A2, R, E >::a2_ [protected]