mln::p_vertices< G, F > Class Template Reference
[Graph based]

Site set based mapping graph vertices to sites. More...

#include <p_vertices.hh>

Inherits site_set_base_< F::result, p_vertices< G, F > >.

List of all members.

Public Types

typedef F fun_t
 Function associated type.
typedef util::vertex< G > graph_element
 Type of graph element this site set focuses on.
typedef G graph_t
 Graph associated type.
typedef util::vertex< G > vertex
 Type of graph vertex.
typedef p_graph_piter< self_,
mln_vertex_bkd_iter(G) > 
bkd_piter
 Backward Site_Iterator associated type.
typedef super_::site element
 Associated types.
typedef p_graph_piter< self_,
mln_vertex_fwd_iter(G) > 
fwd_piter
 Forward Site_Iterator associated type.
typedef fwd_piter piter
 Site_Iterator associated type.
typedef p_vertices_psite< G, F > psite
 Point_Site associated type.

Public Member Functions

template<typename G2 >
bool has (const util::vertex< G2 > &v) const
 Does this site set has v?
bool has (const psite &p) const
 Does this site set has p?
void invalidate ()
 Invalidate this site set.
bool is_valid () const
 Test this site set validity.
std::size_t 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;.
unsigned nsites () const
 Return The number of points (sites) of the set, i.e., the number of vertices.
unsigned nvertices () const
 Return The number of vertices in the graph.
template<typename F2 >
 p_vertices (const p_vertices< G, F2 > &other)
 Copy constructor.
template<typename F2 >
 p_vertices (const Graph< G > &gr, const Function< F2 > &f)
 Construct a graph psite set from a graph of points.
 p_vertices (const Graph< G > &gr, const Function< F > &f)
 Construct a graph psite set from a graph of points.
 p_vertices (const Graph< G > &gr)
 Construct a graph psite set from a graph of points.
 p_vertices ()
 Constructor without argument.
const F & function () const
 Return the association function.
const G & graph () const
 Accessors.
F::result operator() (const psite &p) const
 Return the value associated to an element of this site set.


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.

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.

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.

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

Function associated type.

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.

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.

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

Graph associated type.

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.

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.

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.


Constructor & Destructor Documentation

template<typename G , typename F >
mln::p_vertices< G, F >::p_vertices (  )  [inline]

Constructor without argument.

template<typename G , typename F >
mln::p_vertices< G, F >::p_vertices ( const Graph< G > &  gr  )  [inline]

Construct a graph psite set from a graph of points.

Parameters:
gr The graph upon which the graph psite set is built. The identity function is used.

References mln::p_vertices< G, F >::is_valid().

template<typename G , typename F >
mln::p_vertices< G, F >::p_vertices ( const Graph< G > &  gr,
const Function< F > &  f 
) [inline]

Construct a graph psite set from a graph of points.

Parameters:
gr The graph upon which the graph psite set is built.
f the function which maps a vertex to a site.

References mln::p_vertices< G, F >::is_valid().

template<typename G , typename F >
template<typename F2 >
mln::p_vertices< G, F >::p_vertices ( const Graph< G > &  gr,
const Function< F2 > &  f 
) [inline]

Construct a graph psite set from a graph of points.

Parameters:
gr The graph upon which the graph psite set is built.
f the function which maps a vertex to a site. It must be convertible to the function type F.

References mln::p_vertices< G, F >::is_valid().

template<typename G , typename F >
template<typename F2 >
mln::p_vertices< G, F >::p_vertices ( const p_vertices< G, F2 > &  other  )  [inline]


Member Function Documentation

template<typename G , typename F >
const F & mln::p_vertices< G, F >::function (  )  const [inline]

Return the association function.

Referenced by mln::p_vertices< G, F >::p_vertices().

template<typename G , typename F >
const G & mln::p_vertices< G, F >::graph (  )  const [inline]

Accessors.

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

References mln::p_vertices< G, F >::is_valid().

Referenced by mln::debug::draw_graph(), mln::operator==(), and mln::p_vertices< G, F >::p_vertices().

template<typename G , typename F >
template<typename G2 >
bool mln::p_vertices< G, F >::has ( const util::vertex< G2 > &  v  )  const [inline]

template<typename G , typename F >
bool mln::p_vertices< G, F >::has ( const psite p  )  const [inline]

Does this site set has p?

References mln::p_vertices< G, F >::is_valid().

template<typename G , typename F >
void mln::p_vertices< G, F >::invalidate (  )  [inline]

Invalidate this site set.

template<typename G , typename F >
bool mln::p_vertices< G, F >::is_valid (  )  const [inline]

template<typename G , typename F >
std::size_t mln::p_vertices< G, F >::memory_size (  )  const [inline]

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 >
unsigned mln::p_vertices< G, F >::nsites (  )  const [inline]

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

Required by the mln::Point_Set concept.

References mln::p_vertices< G, F >::nvertices().

template<typename G , typename F >
unsigned mln::p_vertices< G, F >::nvertices (  )  const [inline]

Return The number of vertices in the graph.

Referenced by mln::p_vertices< G, F >::nsites().

template<typename G , typename F >
F::result mln::p_vertices< G, F >::operator() ( const psite p  )  const [inline]

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


Generated on Tue Jul 14 16:32:32 2009 for Milena (Olena) by  doxygen 1.5.9