Generic median_alt function based on histogram over a value set with type S
.
More...
#include <median_alt.hh>
Public Types | |
typedef S::value | argument |
typedef Accumulator< void > | category |
typedef median_alt< S > | exact_t |
typedef const S::value & | q_result |
typedef mln::metal::unqualif < const S::value & >::ret | result |
Public Member Functions | |
void | debug__ () const |
bool | is_valid () const |
Check whether this accu is able to return a result. | |
median_alt (const Value_Set< S > &s) | |
const S::value & | subj_ () |
void | take_as_init (const T &t) |
Take as initialization the value t . | |
void | take_as_init_ (const T &t) |
Default implementation of "take as initialization". | |
void | take_n_times (unsigned n, const T &t) |
Take n times the value t . | |
void | take_n_times_ (unsigned n, const T &t) |
Default implementation of "take n times". | |
const argument & | to_result () const |
Get the value of the accumulator. | |
void | take (const argument &t) |
Manipulators. | |
void | untake (const argument &t) |
void | init () |
Protected Member Functions | |
void | go_minus_ () |
void | go_plus_ () |
Protected Attributes | |
histo< S > | h_ |
unsigned | i_ |
the median index | |
const S & | s_ |
derived from h_ | |
unsigned | sum_minus_ |
unsigned | sum_plus_ |
argument | t_ |
the median argument |
Generic median_alt function based on histogram over a value set with type S
.
typedef S ::value mln::accu::stat::median_alt< S >::argument |
typedef Accumulator<void> mln::Accumulator< median_alt< S > >::category [inherited] |
Reimplemented from mln::Proxy< median_alt< S > >.
typedef median_alt< S > mln::Object< median_alt< S > >::exact_t [inherited] |
typedef const S::value & mln::accu::internal::base< const S::value & , median_alt< S > >::q_result [inherited] |
typedef mln::metal::unqualif< const S::value & >::ret mln::accu::internal::base< const S::value & , median_alt< S > >::result [inherited] |
mln::accu::stat::median_alt< S >::median_alt | ( | const Value_Set< S > & | s | ) | [inline] |
References mln::accu::stat::median_alt< S >::init().
void mln::accu::stat::median_alt< S >::debug__ | ( | ) | const [inline] |
void mln::accu::stat::median_alt< S >::go_minus_ | ( | ) | [inline, protected] |
References mln::accu::stat::median_alt< S >::h_, mln::accu::stat::median_alt< S >::i_, mln::accu::stat::median_alt< S >::s_, mln::accu::histo< V >::sum(), mln::accu::stat::median_alt< S >::sum_minus_, mln::accu::stat::median_alt< S >::sum_plus_, and mln::accu::stat::median_alt< S >::t_.
Referenced by mln::accu::stat::median_alt< S >::take(), and mln::accu::stat::median_alt< S >::untake().
void mln::accu::stat::median_alt< S >::go_plus_ | ( | ) | [inline, protected] |
References mln::accu::stat::median_alt< S >::h_, mln::accu::stat::median_alt< S >::i_, mln::accu::stat::median_alt< S >::s_, mln::accu::histo< V >::sum(), mln::accu::stat::median_alt< S >::sum_minus_, mln::accu::stat::median_alt< S >::sum_plus_, and mln::accu::stat::median_alt< S >::t_.
Referenced by mln::accu::stat::median_alt< S >::take(), and mln::accu::stat::median_alt< S >::untake().
void mln::accu::stat::median_alt< S >::init | ( | ) | [inline] |
References mln::accu::stat::median_alt< S >::h_, mln::accu::stat::median_alt< S >::i_, mln::accu::histo< V >::init(), mln::accu::stat::median_alt< S >::s_, mln::accu::stat::median_alt< S >::sum_minus_, mln::accu::stat::median_alt< S >::sum_plus_, and mln::accu::stat::median_alt< S >::t_.
Referenced by mln::accu::stat::median_alt< S >::median_alt(), and mln::accu::stat::median_alt< S >::untake().
bool mln::accu::stat::median_alt< S >::is_valid | ( | ) | const [inline] |
Check whether this accu is able to return a result.
Always true here.
const S::value & mln::accu::internal::base< const S::value & , median_alt< S > >::subj_ | ( | ) | [inherited] |
void mln::accu::stat::median_alt< S >::take | ( | const argument & | t | ) | [inline] |
Manipulators.
References mln::accu::stat::median_alt< S >::go_minus_(), mln::accu::stat::median_alt< S >::go_plus_(), mln::accu::stat::median_alt< S >::h_, mln::accu::stat::median_alt< S >::i_, mln::accu::stat::median_alt< S >::s_, mln::accu::histo< V >::sum(), mln::accu::stat::median_alt< S >::sum_minus_, mln::accu::stat::median_alt< S >::sum_plus_, mln::accu::stat::median_alt< S >::t_, and mln::accu::histo< V >::take().
void mln::Accumulator< median_alt< S > >::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< median_alt< S > >::take_as_init_ | ( | const T & | t | ) | [inherited] |
Default implementation of "take as initialization".
void mln::Accumulator< median_alt< S > >::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 '_').
void mln::Accumulator< median_alt< S > >::take_n_times_ | ( | unsigned | n, | |
const T & | t | |||
) | [inherited] |
Default implementation of "take n times".
const median_alt< S >::argument & mln::accu::stat::median_alt< S >::to_result | ( | ) | const [inline] |
Get the value of the accumulator.
References mln::accu::stat::median_alt< S >::t_.
void mln::accu::stat::median_alt< S >::untake | ( | const argument & | t | ) | [inline] |
References mln::accu::stat::median_alt< S >::go_minus_(), mln::accu::stat::median_alt< S >::go_plus_(), mln::accu::stat::median_alt< S >::h_, mln::accu::stat::median_alt< S >::i_, mln::accu::stat::median_alt< S >::init(), mln::accu::histo< V >::sum(), mln::accu::stat::median_alt< S >::sum_minus_, mln::accu::stat::median_alt< S >::sum_plus_, mln::accu::stat::median_alt< S >::t_, and mln::accu::histo< V >::untake().
histo<S> mln::accu::stat::median_alt< S >::h_ [protected] |
unsigned mln::accu::stat::median_alt< S >::i_ [protected] |
the median index
Referenced by mln::accu::stat::median_alt< value::set< T > >::debug__(), mln::accu::stat::median_alt< S >::go_minus_(), mln::accu::stat::median_alt< S >::go_plus_(), mln::accu::stat::median_alt< S >::init(), mln::accu::stat::median_alt< S >::take(), and mln::accu::stat::median_alt< S >::untake().
const S& mln::accu::stat::median_alt< S >::s_ [protected] |
unsigned mln::accu::stat::median_alt< S >::sum_minus_ [protected] |
unsigned mln::accu::stat::median_alt< S >::sum_plus_ [protected] |
argument mln::accu::stat::median_alt< S >::t_ [protected] |
the median argument
Referenced by mln::accu::stat::median_alt< value::set< T > >::debug__(), mln::accu::stat::median_alt< S >::go_minus_(), mln::accu::stat::median_alt< S >::go_plus_(), mln::accu::stat::median_alt< S >::init(), mln::accu::stat::median_alt< S >::take(), mln::accu::stat::median_alt< S >::to_result(), and mln::accu::stat::median_alt< S >::untake().