Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

mln::accu::count_adjacent_vertices< F, S > Struct Template Reference
[On images]

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>

Inheritance diagram for mln::accu::count_adjacent_vertices< F, S >:
Inheritance graph

List of all members.

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.

Detailed Description

template<typename F, typename S>
struct mln::accu::count_adjacent_vertices< F, S >

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.

Definition at line 58 of file accu/count_adjacent_vertices.hh.


Member Typedef Documentation

template<typename F, typename S>
typedef mln::util::pix< pw::image<F,S> > mln::accu::count_adjacent_vertices< F, S >::argument

Definition at line 62 of file accu/count_adjacent_vertices.hh.

typedef Accumulator<void> mln::Accumulator< count_adjacent_vertices< F, S > >::category [inherited]

Reimplemented from mln::Proxy< count_adjacent_vertices< F, S > >.

Definition at line 80 of file accumulator.hh.

typedef count_adjacent_vertices< F, S > mln::Object< count_adjacent_vertices< F, S > >::exact_t [inherited]

Definition at line 173 of file object.hh.

typedef unsigned mln::accu::internal::base< unsigned , count_adjacent_vertices< F, S > >::q_result [inherited]

Definition at line 58 of file base.hh.

typedef mln::metal::unqualif< unsigned >::ret mln::accu::internal::base< unsigned , count_adjacent_vertices< F, S > >::result [inherited]

Definition at line 59 of file base.hh.


Constructor & Destructor Documentation

template<typename F , typename S >
mln::accu::count_adjacent_vertices< F, S >::count_adjacent_vertices (  )  [inline]

Member Function Documentation

template<typename F , typename S >
void mln::accu::count_adjacent_vertices< F, S >::init (  )  [inline]
template<typename F , typename S >
bool mln::accu::count_adjacent_vertices< F, S >::is_valid (  )  const [inline]

Return whether this accu can return a result.

Definition at line 177 of file accu/count_adjacent_vertices.hh.

template<typename F , typename S >
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.

Definition at line 159 of file accu/count_adjacent_vertices.hh.

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]
template<typename F , typename S >
void mln::accu::count_adjacent_vertices< F, S >::take ( const argument arg  )  [inline]
template<typename F , typename S >
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".

template<typename F , typename S >
unsigned mln::accu::count_adjacent_vertices< F, S >::to_result (  )  const [inline]

Get the value of the accumulator.

Definition at line 151 of file accu/count_adjacent_vertices.hh.

References mln::accu::count_adjacent_vertices< F, S >::count__.

template<typename F , typename S >
void mln::accu::count_adjacent_vertices< F, S >::update_ (  )  [inline, protected]

Member Data Documentation

template<typename F, typename S>
unsigned mln::accu::count_adjacent_vertices< F, S >::count__ [protected]
template<typename F, typename S>
std::set<unsigned> mln::accu::count_adjacent_vertices< F, S >::vertices_ [protected]