Generic min and max accumulator class. More...
#include <min_max.hh>
Public Types | |
typedef mln_argument(min< V >) | argument |
typedef Accumulator< void > | category |
typedef E | exact_t |
typedef R | q_result |
typedef mln::metal::unqualif < R >::ret | result |
typedef min< V >::result | result_1 |
typedef max< V >::result | result_2 |
Public Member Functions | |
min< V >::result | first () const |
bool | is_valid () const |
Check whether this accu is able to return a result. | |
max< V >::result | 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 pair< min< V >, max< V >, mln_argument(min< V >) > &other) |
std::pair< typename min< V > ::result, typename max< V > ::result > | to_result () const |
Get the value of the accumulator. | |
void | get_result (result_1 &r1, result_2 &r2) const |
Protected Attributes | |
min< V > | a1_ |
max< V > | a2_ |
Generic min and max accumulator class.
The parameter V
is the type of values.
typedef mln_argument(min< V > ) mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::argument [inherited] |
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] |
typedef min< V > ::result mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::result_1 [inherited] |
typedef max< V > ::result mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::result_2 [inherited] |
void mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::get_result | ( | result_1 & | r1, | |
result_2 & | r2 | |||
) | const [inherited] |
void mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::init | ( | ) | [inherited] |
Manipulators.
bool mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::is_valid | ( | ) | const [inherited] |
Check whether this accu is able to return a result.
Always true here.
R base::subj_ | ( | ) | [inline, inherited] |
References mln::exact().
void mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::take | ( | const argument & | t | ) | [inherited] |
void mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::take | ( | const pair< min< V > , max< V > , mln_argument(min< V > ) > & | other | ) | [inherited] |
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::pair< min< V > , max< V > , mln_argument(min< V > ) >::take_as_init_ | ( | const argument & | t | ) | [inherited] |
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().
std::pair<typename min< V > ::result, typename max< V > ::result> mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::to_result | ( | ) | const [inherited] |
Get the value of the accumulator.
min< V > mln::accu::pair< min< V > , max< V > , mln_argument(min< V > ) >::a1_ [protected, inherited] |