#include <sum.hh>
Public Types | |
typedef I::value | argument |
typedef Accumulator< void > | category |
typedef E | exact_t |
typedef R | q_result |
typedef mln::metal::unqualif < R >::ret | result |
Public Member Functions | |
bool | is_valid () const |
Check whether this accu is able to return a result. | |
void | set_value (const util::pix< I > &px) |
void | set_value (const argument &v) |
Set the return value of the accumalator. | |
R | subj_ () |
sum () | |
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". | |
S | to_result () const |
Get the value of the accumulator. | |
void | untake (const util::pix< I > &px) |
void | untake (const argument &v) |
Untake a value from the accumulator. | |
void | init () |
Manipulators. | |
void | take (const sum< I, S > &other) |
void | take (const util::pix< I > &px) |
void | take (const argument &v) |
void | take_as_init_ (const util::pix< I > &px) |
void | take_as_init_ (const argument &v) |
Protected Attributes | |
S | s_ |
The sum value. | |
Private Types | |
typedef mln::accu::internal::base< S, sum< I > > | super_ |
Definition at line 80 of file morpho/attribute/sum.hh.
typedef I ::value mln::morpho::attribute::sum< I, S >::argument |
Definition at line 85 of file morpho/attribute/sum.hh.
typedef Accumulator<void> mln::Accumulator< E >::category [inherited] |
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 mln::accu::internal::base< S, sum<I> > mln::morpho::attribute::sum< I, S >::super_ [private] |
Definition at line 82 of file morpho/attribute/sum.hh.
mln::morpho::attribute::sum< I, S >::sum | ( | ) | [inline] |
Definition at line 129 of file morpho/attribute/sum.hh.
References mln::morpho::attribute::sum< I, S >::init().
void mln::morpho::attribute::sum< I, S >::init | ( | ) | [inline] |
Manipulators.
Definition at line 137 of file morpho/attribute/sum.hh.
References mln::literal::zero.
Referenced by mln::morpho::attribute::sum< I, S >::sum().
bool mln::morpho::attribute::sum< I, S >::is_valid | ( | ) | const [inline] |
Check whether this accu is able to return a result.
Return always true.
Definition at line 229 of file morpho/attribute/sum.hh.
void mln::morpho::attribute::sum< I, S >::set_value | ( | const util::pix< I > & | px | ) | [inline] |
Definition at line 213 of file morpho/attribute/sum.hh.
References mln::morpho::attribute::sum< I, S >::set_value(), and mln::util::pix< I >::v().
void mln::morpho::attribute::sum< I, S >::set_value | ( | const argument & | v | ) | [inline] |
Set the return value of the accumalator.
Definition at line 205 of file morpho/attribute/sum.hh.
Referenced by mln::morpho::attribute::sum< I, S >::set_value().
R base::subj_ | ( | ) | [inline, inherited] |
void mln::morpho::attribute::sum< I, S >::take | ( | const sum< I, S > & | other | ) | [inline] |
Definition at line 163 of file morpho/attribute/sum.hh.
References mln::morpho::attribute::sum< I, S >::s_.
void mln::morpho::attribute::sum< I, S >::take | ( | const util::pix< I > & | px | ) | [inline] |
Definition at line 155 of file morpho/attribute/sum.hh.
References mln::morpho::attribute::sum< I, S >::take(), and mln::util::pix< I >::v().
void mln::morpho::attribute::sum< I, S >::take | ( | const argument & | v | ) | [inline] |
Definition at line 147 of file morpho/attribute/sum.hh.
Referenced by mln::morpho::attribute::sum< I, S >::take().
void mln::Accumulator< E >::take_as_init | ( | const T & | t | ) | [inline, inherited] |
Take as initialization the value t
.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
Reimplemented in mln::accu::stat::variance< T, S, R >.
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().
void mln::Accumulator< E >::take_as_init_ | ( | const T & | t | ) | [inline, inherited] |
Default implementation of "take as initialization".
Reimplemented in mln::accu::math::inf< T >, mln::accu::math::sum< T, S >, mln::accu::math::sup< T >, mln::accu::pair< A1, A2, T >, mln::accu::rms< T, V >, mln::accu::stat::max< T >, mln::accu::stat::min< T >, mln::accu::stat::rank_high_quant< T >, and mln::accu::stat::var< T >.
Definition at line 200 of file accumulator.hh.
References mln::exact().
void mln::morpho::attribute::sum< I, S >::take_as_init_ | ( | const util::pix< I > & | px | ) | [inline] |
Definition at line 181 of file morpho/attribute/sum.hh.
References mln::morpho::attribute::sum< I, S >::take_as_init_(), and mln::util::pix< I >::v().
void mln::morpho::attribute::sum< I, S >::take_as_init_ | ( | const argument & | v | ) | [inline] |
Definition at line 173 of file morpho/attribute/sum.hh.
Referenced by mln::morpho::attribute::sum< I, S >::take_as_init_().
void mln::Accumulator< E >::take_n_times | ( | unsigned | n, | |
const T & | t | |||
) | [inline, 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().
void mln::Accumulator< E >::take_n_times_ | ( | unsigned | n, | |
const T & | t | |||
) | [inline, inherited] |
Default implementation of "take n times".
Reimplemented in mln::accu::stat::var< T >.
Definition at line 230 of file accumulator.hh.
References mln::exact().
S mln::morpho::attribute::sum< I, S >::to_result | ( | ) | const [inline] |
void mln::morpho::attribute::sum< I, S >::untake | ( | const util::pix< I > & | px | ) | [inline] |
Definition at line 197 of file morpho/attribute/sum.hh.
References mln::morpho::attribute::sum< I, S >::untake(), and mln::util::pix< I >::v().
void mln::morpho::attribute::sum< I, S >::untake | ( | const argument & | v | ) | [inline] |
Untake a value from the accumulator.
Definition at line 189 of file morpho/attribute/sum.hh.
Referenced by mln::morpho::attribute::sum< I, S >::untake().
S mln::morpho::attribute::sum< I, S >::s_ [protected] |
Definition at line 120 of file morpho/attribute/sum.hh.
Referenced by mln::morpho::attribute::sum< I, S >::take().