Base implementation of a couple of accumulators. More...
#include <couple.hh>
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 |
R | 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_ |
Base implementation of a couple of accumulators.
The parameter T
is the type of values.
typedef Accumulator<void> mln::Accumulator< E >::category [inherited] |
Reimplemented from mln::Proxy< E >.
typedef E mln::Object< E >::exact_t [inherited] |
typedef R mln::accu::internal::base< R, E >::q_result [inherited] |
typedef mln::metal::unqualif< R >::ret mln::accu::internal::base< R, E >::result [inherited] |
mln::accu::internal::couple< A1, A2, R, E >::couple | ( | ) | [inline, protected] |
A1 & mln::accu::internal::couple< A1, A2, R, E >::first | ( | ) | [inline] |
References mln::accu::internal::couple< A1, A2, R, E >::a1_.
const A1 & mln::accu::internal::couple< A1, A2, R, E >::first | ( | ) | const [inline] |
References mln::accu::internal::couple< A1, A2, R, E >::a1_.
void mln::accu::internal::couple< A1, A2, R, E >::init | ( | ) | [inline] |
Manipulators.
References mln::accu::internal::couple< A1, A2, R, E >::a1_, and mln::accu::internal::couple< A1, A2, R, E >::a2_.
Referenced by mln::accu::internal::couple< A1, A2, R, E >::couple().
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.
References mln::accu::internal::couple< A1, A2, R, E >::a1_, and mln::accu::internal::couple< A1, A2, R, E >::a2_.
typedef mln::accu::internal::couple< A1, A2, R, E >::mln_argument | ( | A1 | ) |
A2 & mln::accu::internal::couple< A1, A2, R, E >::second | ( | ) | [inline] |
References mln::accu::internal::couple< A1, A2, R, E >::a2_.
const A2 & mln::accu::internal::couple< A1, A2, R, E >::second | ( | ) | const [inline] |
References mln::accu::internal::couple< A1, A2, R, E >::a2_.
R base::subj_ | ( | ) | [inline, inherited] |
References mln::exact().
void mln::accu::internal::couple< A1, A2, R, E >::take | ( | const argument & | t | ) | [inline] |
void mln::accu::internal::couple< A1, A2, R, E >::take | ( | const E & | other | ) | [inline] |
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 '_').
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().
void mln::accu::internal::couple< A1, A2, R, E >::take_as_init | ( | const argument & | t | ) | [inline] |
void mln::Accumulator< E >::take_as_init_ | ( | const T & | t | ) | [inherited] |
Default implementation of "take as initialization".
References mln::exact().
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 '_').
References mln::exact(), and mln::mln_exact().
void mln::Accumulator< E >::take_n_times_ | ( | unsigned | n, | |
const T & | t | |||
) | [inherited] |
Default implementation of "take n times".
References mln::exact().
A1 mln::accu::internal::couple< A1, A2, R, E >::a1_ [protected] |
A2 mln::accu::internal::couple< A1, A2, R, E >::a2_ [protected] |