Accumulator class counting the number of vertices adjacent to a set of mln::p_edges_psite (i.e., a set of edges). More...
#include <count_adjacent_vertices.hh>
Public Types | |
typedef mln::util::pix < pw::image< F, S > > | argument |
typedef Accumulator< void > | category |
typedef count_adjacent_vertices< F, S > | exact_t |
typedef unsigned | q_result |
typedef mln::metal::unqualif < unsigned >::ret | result |
Public Member Functions | |
count_adjacent_vertices () | |
bool | is_valid () const |
Return whether this accu can return a result. | |
unsigned | 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". | |
unsigned | to_result () const |
Get the value of the accumulator. | |
void | init () |
Manipulators. | |
void | take (const argument &arg) |
void | take (const count_adjacent_vertices< F, S > &other) |
void | set_value (unsigned c) |
Force the value of the counter to c. | |
Protected Member Functions | |
void | update_ () |
Update the value of the counter. | |
Protected Attributes | |
unsigned | count__ |
The value of the counter. | |
std::set< unsigned > | vertices_ |
The set of adjacent vertices. |
Accumulator class counting the number of vertices adjacent to a set of mln::p_edges_psite (i.e., a set of edges).
The type to be count is mln::util::pix< pw::image<F, S> > where F
and S
are the parameters of this class.
This accumulator is used by mln::closing_area_on_vertices and mln::opening_area_on_vertices.
typedef mln::util::pix< pw::image<F,S> > mln::accu::count_adjacent_vertices< F, S >::argument |
typedef Accumulator<void> mln::Accumulator< count_adjacent_vertices< F, S > >::category [inherited] |
Reimplemented from mln::Proxy< count_adjacent_vertices< F, S > >.
typedef count_adjacent_vertices< F, S > mln::Object< count_adjacent_vertices< F, S > >::exact_t [inherited] |
typedef unsigned mln::accu::internal::base< unsigned , count_adjacent_vertices< F, S > >::q_result [inherited] |
typedef mln::metal::unqualif< unsigned >::ret mln::accu::internal::base< unsigned , count_adjacent_vertices< F, S > >::result [inherited] |
mln::accu::count_adjacent_vertices< F, S >::count_adjacent_vertices | ( | ) | [inline] |
void mln::accu::count_adjacent_vertices< F, S >::init | ( | ) | [inline] |
Manipulators.
References mln::accu::count_adjacent_vertices< F, S >::update_(), and mln::accu::count_adjacent_vertices< F, S >::vertices_.
Referenced by mln::accu::count_adjacent_vertices< F, S >::count_adjacent_vertices().
bool mln::accu::count_adjacent_vertices< F, S >::is_valid | ( | ) | const [inline] |
Return whether this accu can return a result.
void mln::accu::count_adjacent_vertices< F, S >::set_value | ( | unsigned | c | ) | [inline] |
Force the value of the counter to c.
Reset the other member.
References mln::accu::count_adjacent_vertices< F, S >::count__, and mln::accu::count_adjacent_vertices< F, S >::vertices_.
unsigned mln::accu::internal::base< unsigned , count_adjacent_vertices< F, S > >::subj_ | ( | ) | [inherited] |
void mln::accu::count_adjacent_vertices< F, S >::take | ( | const argument & | arg | ) | [inline] |
void mln::accu::count_adjacent_vertices< F, S >::take | ( | const count_adjacent_vertices< F, S > & | other | ) | [inline] |
void mln::Accumulator< count_adjacent_vertices< F, 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< count_adjacent_vertices< F, S > >::take_as_init_ | ( | const T & | t | ) | [inherited] |
Default implementation of "take as initialization".
void mln::Accumulator< count_adjacent_vertices< F, 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< count_adjacent_vertices< F, S > >::take_n_times_ | ( | unsigned | n, | |
const T & | t | |||
) | [inherited] |
Default implementation of "take n times".
unsigned mln::accu::count_adjacent_vertices< F, S >::to_result | ( | ) | const [inline] |
Get the value of the accumulator.
References mln::accu::count_adjacent_vertices< F, S >::count__.
void mln::accu::count_adjacent_vertices< F, S >::update_ | ( | ) | [inline, protected] |
Update the value of the counter.
References mln::accu::count_adjacent_vertices< F, S >::count__, and mln::accu::count_adjacent_vertices< F, S >::vertices_.
Referenced by mln::accu::count_adjacent_vertices< F, S >::init(), and mln::accu::count_adjacent_vertices< F, S >::take().
unsigned mln::accu::count_adjacent_vertices< F, S >::count__ [protected] |
The value of the counter.
Referenced by mln::accu::count_adjacent_vertices< F, S >::set_value(), mln::accu::count_adjacent_vertices< F, S >::to_result(), and mln::accu::count_adjacent_vertices< F, S >::update_().
std::set<unsigned> mln::accu::count_adjacent_vertices< F, S >::vertices_ [protected] |
The set of adjacent vertices.
Referenced by mln::accu::count_adjacent_vertices< F, S >::init(), mln::accu::count_adjacent_vertices< F, S >::set_value(), mln::accu::count_adjacent_vertices< F, S >::take(), and mln::accu::count_adjacent_vertices< F, S >::update_().