$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::p_vertices< G, F > Class Template Reference

#include <mln/core/site_set/p_vertices.hh>

Public Member Functions

 p_vertices ()
 p_vertices (const Graph< G > &gr)
 p_vertices (const Graph< G > &gr, const Function< F > &f)
template<typename F2 >
 p_vertices (const Graph< G > &gr, const Function< F2 > &f)
template<typename F2 >
 p_vertices (const p_vertices< G, F2 > &other)
bool has (const psite &p) const
template<typename G2 >
bool has (const util::vertex< G2 > &v) const
void invalidate ()
bool is_empty () const
bool is_valid () const
std::size_t memory_size () const
unsigned nsites () const
unsigned nvertices () const
F::result operator() (const psite &p) const
F::result operator() (const util::vertex< G > &p) const
F::result operator() (unsigned id_v) const
const G & graph () const
const F & function () const

Public Types

typedef Site_Set< void > category
typedef p_vertices< G, F > exact_t
typedef F fun_t
typedef util::vertex< G > graph_element
typedef G graph_t
typedef subject< F::result >::ret site
typedef util::vertex< G > vertex
typedef super_::site element
typedef p_vertices_psite< G, F > psite
typedef p_graph_piter< self_,
mln_vertex_fwd_iter(G) > 
fwd_piter
typedef p_graph_piter< self_,
mln_vertex_bkd_iter(G) > 
bkd_piter
typedef fwd_piter piter

Detailed Description

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
class mln::p_vertices< G, F >

Site set based mapping graph vertices to sites.

Definition at line 71 of file p_vertices.hh.

Constructor & Destructor Documentation

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
mln::p_vertices< G, F >::p_vertices ( )

Constructor without argument.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
mln::p_vertices< G, F >::p_vertices ( const Graph< G > &  gr)

Construct a graph psite set from a graph of points.

Parameters
grThe graph upon which the graph psite set is built. The identity function is used.
template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
mln::p_vertices< G, F >::p_vertices ( const Graph< G > &  gr,
const Function< F > &  f 
)

Construct a graph psite set from a graph of points.

Parameters
grThe graph upon which the graph psite set is built.
fthe function which maps a vertex to a site.
template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
template<typename F2 >
mln::p_vertices< G, F >::p_vertices ( const Graph< G > &  gr,
const Function< F2 > &  f 
)

Construct a graph psite set from a graph of points.

Parameters
grThe graph upon which the graph psite set is built.
fthe function which maps a vertex to a site. It must be convertible to the function type F.
template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
template<typename F2 >
mln::p_vertices< G, F >::p_vertices ( const p_vertices< G, F2 > &  other)

Copy constructor.

Member Function Documentation

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
const F& mln::p_vertices< G, F >::function ( ) const

Return the association function.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
const G& mln::p_vertices< G, F >::graph ( ) const

Accessors.

Return the graph associated to this site set (const version)

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
bool mln::p_vertices< G, F >::has ( const psite p) const

Does this site set has p?

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
template<typename G2 >
bool mln::p_vertices< G, F >::has ( const util::vertex< G2 > &  v) const

Does this site set has v?

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
void mln::p_vertices< G, F >::invalidate ( )

Invalidate this site set.

bool mln::internal::site_set_base_< F::result , p_vertices< G, F > >::is_empty ( ) const
inherited

Test if the site set is empty.

This final method dispatches to is_empty_ whose default implementation relies on the 'nsites' method.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
bool mln::p_vertices< G, F >::is_valid ( ) const

Test this site set validity.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
std::size_t mln::p_vertices< G, F >::memory_size ( ) const

Does this site set has vertex_id? FIXME: causes ambiguities while calling has(mln::neighb_fwd_niter<>); bool has(unsigned vertex_id) const;.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
unsigned mln::p_vertices< G, F >::nsites ( ) const

Return The number of points (sites) of the set, i.e., the number of vertices.

Required by the mln::Point_Set concept.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
unsigned mln::p_vertices< G, F >::nvertices ( ) const

Return The number of vertices in the graph.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
F ::result mln::p_vertices< G, F >::operator() ( const psite p) const

Return the value associated to an element of this site set.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
F ::result mln::p_vertices< G, F >::operator() ( const util::vertex< G > &  p) const
template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
F ::result mln::p_vertices< G, F >::operator() ( unsigned  id_v) const

Member Typedef Documentation

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef p_graph_piter< self_, mln_vertex_bkd_iter(G) > mln::p_vertices< G, F >::bkd_piter

Backward Site_Iterator associated type.

Definition at line 132 of file p_vertices.hh.

typedef Site_Set<void> mln::Site_Set< p_vertices< G, F > >::category
inherited

Definition at line 74 of file core/concept/site_set.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef super_ ::site mln::p_vertices< G, F >::element

Associated types.

Element associated type.

Definition at line 123 of file p_vertices.hh.

typedef p_vertices< G, F > mln::Object< p_vertices< G, F > >::exact_t
inherited

Definition at line 105 of file object.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef F mln::p_vertices< G, F >::fun_t

Function associated type.

Definition at line 84 of file p_vertices.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef p_graph_piter< self_, mln_vertex_fwd_iter(G) > mln::p_vertices< G, F >::fwd_piter

Forward Site_Iterator associated type.

Definition at line 129 of file p_vertices.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef util::vertex<G> mln::p_vertices< G, F >::graph_element

Type of graph element this site set focuses on.

Definition at line 91 of file p_vertices.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef G mln::p_vertices< G, F >::graph_t

Graph associated type.

Definition at line 81 of file p_vertices.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef fwd_piter mln::p_vertices< G, F >::piter

Site_Iterator associated type.

Definition at line 135 of file p_vertices.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef p_vertices_psite<G,F> mln::p_vertices< G, F >::psite

Point_Site associated type.

Definition at line 126 of file p_vertices.hh.

typedef subject<F::result >::ret mln::internal::site_set_base_< F::result , p_vertices< G, F > >::site
inherited

Site associated type.

Definition at line 58 of file site_set_base.hh.

template<typename G, typename F = util::internal::id2element<G,util::vertex<G> >>
typedef util::vertex<G> mln::p_vertices< G, F >::vertex

Type of graph vertex.

Definition at line 87 of file p_vertices.hh.