Milena (Olena)  User documentation 2.0a Id
mln::p_edges< G, F > Class Template Reference

Site set mapping graph edges and image sites. More...

#include <p_edges.hh>

Inherits mln::internal::site_set_base_< F::result, p_edges< G, F > >.

List of all members.

Public Types

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

Public Member Functions

bool has (const psite &p) const
 Does this site set has site p?
template<typename G2 >
bool has (const util::edge< G2 > &e) const
 Does this site set has edge e?
void invalidate ()
 Invalidate this site set.
bool is_valid () const
 Is this site set valid?
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 nedges () const
 Return The number of edges in the graph.
unsigned nsites () const
 Return The number of points (sites) of the set, i.e., the number of edges.
 p_edges ()
 ConstructorsDefault constructor.
 p_edges (const Graph< G > &gr)
 Construct a graph edge psite set from a graph.
 p_edges (const Graph< G > &gr, const Function< F > &f)
 Construct a graph edge psite set from a graph and a function.
template<typename F2 >
 p_edges (const Graph< G > &gr, const Function< F2 > &f)
 Construct a graph edge psite set from a graph and a function.
const G & graph () const
 Accessors.
const F & function () const
 Return the mapping function.

Detailed Description

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
class mln::p_edges< G, F >

Site set mapping graph edges and image sites.

Definition at line 71 of file p_edges.hh.


Member Typedef Documentation

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
typedef p_graph_piter< self_, mln_edge_bkd_iter(G) > mln::p_edges< G, F >::bkd_piter

Backward Site_Iterator associated type.

Definition at line 129 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
typedef util::edge<G> mln::p_edges< G, F >::edge

Type of graph edge.

Definition at line 87 of file p_edges.hh.

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

Associated types.

Element associated type.

Definition at line 120 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
typedef F mln::p_edges< G, F >::fun_t

Function associated type.

Definition at line 84 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
typedef p_graph_piter< self_, mln_edge_fwd_iter(G) > mln::p_edges< G, F >::fwd_piter

Forward Site_Iterator associated type.

Definition at line 126 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
typedef util::edge<G> mln::p_edges< G, F >::graph_element

Type of graph element this site set focuses on.

Definition at line 90 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
typedef G mln::p_edges< G, F >::graph_t

Graph associated type.

Definition at line 81 of file p_edges.hh.

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

Site_Iterator associated type.

Definition at line 132 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
typedef p_edges_psite<G, F> mln::p_edges< G, F >::psite

Point_Site associated type.

Definition at line 123 of file p_edges.hh.


Constructor & Destructor Documentation

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

ConstructorsDefault constructor.

Definition at line 204 of file p_edges.hh.

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

Construct a graph edge psite set from a graph.

Parameters:
grThe graph upon which the graph edge psite set is built.

Definition at line 210 of file p_edges.hh.

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

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

Construct a graph edge psite set from a graph and a function.

Parameters:
grThe graph upon which the graph edge psite set is built.
fthe function mapping edges and sites.

Definition at line 222 of file p_edges.hh.

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

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

Construct a graph edge psite set from a graph and a function.

Parameters:
grThe graph upon which the graph edge psite set is built.
fthe function mapping edges and sites. It must be convertible towards the function type F.

Definition at line 232 of file p_edges.hh.

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


Member Function Documentation

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

Return the mapping function.

Definition at line 325 of file p_edges.hh.

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

Accessors.

Return the graph associated to this site set

Definition at line 316 of file p_edges.hh.

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

Referenced by mln::operator==().

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

Does this site set has site p?

Definition at line 277 of file p_edges.hh.

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

template<typename G , typename F >
template<typename G2 >
bool mln::p_edges< G, F >::has ( const util::edge< G2 > &  e) const [inline]

Does this site set has edge e?

Definition at line 287 of file p_edges.hh.

References mln::util::edge< G >::graph(), mln::util::edge< G >::is_valid(), and mln::p_edges< G, F >::is_valid().

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

Invalidate this site set.

Definition at line 269 of file p_edges.hh.

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

Is this site set valid?

Definition at line 261 of file p_edges.hh.

Referenced by mln::p_edges< G, F >::graph(), mln::p_edges< G, F >::has(), and mln::p_edges< G, F >::p_edges().

template<typename G , typename F >
std::size_t mln::p_edges< 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;.

Definition at line 306 of file p_edges.hh.

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

Return The number of edges in the graph.

Definition at line 253 of file p_edges.hh.

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

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

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

Definition at line 245 of file p_edges.hh.

References mln::p_edges< G, F >::nedges().

 All Classes Namespaces Functions Variables Typedefs Enumerator