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

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

#include <p_edges.hh>

Inheritance diagram for mln::p_edges< G, F >:

Inheritance graph

List of all members.

Public Types

typedef Site_Set< void > category
typedef util::edge< G > edge
 Type of graph edge.
typedef E exact_t
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 subject< P >::ret site
 Site associated type.
typedef p_graph_piter< self_,
mln_edge_bkd_iter(G) > 
bkd_piter
 Backward Site_Iterator associated type.
typedef super_::site element
 Associated types.
typedef p_graph_piter< self_,
mln_edge_fwd_iter(G) > 
fwd_piter
 Forward Site_Iterator associated type.
typedef fwd_piter piter
 Site_Iterator associated type.
typedef p_edges_psite< G, F > psite
 Point_Site associated type.

Public Member Functions

template<typename G2>
bool has (const util::edge< G2 > &e) const
 Does this site set has edge e?
bool has (const psite &p) const
 Does this site set has site p?
void invalidate ()
 Invalidate this site set.
bool is_empty () const
 Test if the site set is empty.
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.
const F & function () const
 Return the mapping function.
const G & graph () const
 Accessors.
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.
 p_edges (const Graph< G > &gr, const Function< F > &f)
 Construct a graph edge psite set from a graph and a function.
 p_edges (const Graph< G > &gr)
 Construct a graph edge psite set from a graph.
 p_edges ()
 Constructors

Default constructor.


Package Attributes

 __pad0__:site_set_base_< typename F ::result
self_ super_

Private Types

typedef p_edges< G, F > self_

Private Attributes

f_
g_

Related Functions

(Note that these are not member functions.)

template<typename Sl, typename Sr>
p_set< typename Sl::site > diff (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Set theoretic difference of lhs and rhs.
template<typename Sl, typename Sr>
p_set< typename Sl::site > inter (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Intersection between a couple of point sets.
template<typename Sl, typename Sr>
bool operator< (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Strict inclusion test between site sets lhs and rhs.
template<typename S>
std::ostream & operator<< (std::ostream &ostr, const Site_Set< S > &set)
 Print a site set set into the output stream ostr.
template<typename Sl, typename Sr>
bool operator<= (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Inclusion test between site sets lhs and rhs.
template<typename Sl, typename Sr>
bool operator== (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Equality test between site sets lhs and rhs.
template<typename Sl, typename Sr>
p_set< typename Sl::site > sym_diff (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Set theoretic symmetrical difference of lhs and rhs.
template<typename Sl, typename Sr>
p_set< typename Sl::site > uni (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Union of a couple of point sets.
template<typename S>
p_set< typename S::site > unique (const Site_Set< S > &s)
 Give the unique set of s.


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 70 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 128 of file p_edges.hh.

template<typename E>
typedef Site_Set<void> mln::Site_Set< E >::category [inherited]

Reimplemented from mln::Object< E >.

Definition at line 67 of file mln/core/concept/site_set.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 86 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 119 of file p_edges.hh.

template<typename E>
typedef E mln::Object< E >::exact_t [inherited]

Definition at line 172 of file object.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 83 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 125 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 89 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 80 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 131 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 122 of file p_edges.hh.

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

Definition at line 74 of file p_edges.hh.

template<typename P, typename E>
typedef subject<P>::ret mln::internal::site_set_base_< P, E >::site [inherited]

Site associated type.

Reimplemented in mln::p_centered< W >.

Definition at line 55 of file site_set_base.hh.


Constructor & Destructor Documentation

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

Constructors

Default constructor.

Definition at line 203 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:
gr The graph upon which the graph edge psite set is built.

Definition at line 209 of file p_edges.hh.

References mln::exact(), and 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:
gr The graph upon which the graph edge psite set is built.
f the function mapping edges and sites.

Definition at line 221 of file p_edges.hh.

References mln::exact(), and 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:
gr The graph upon which the graph edge psite set is built.
f the function mapping edges and sites. It must be convertible towards the function type F.

Definition at line 231 of file p_edges.hh.

References mln::exact(), mln::convert::from_to(), and 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 324 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 315 of file p_edges.hh.

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

Referenced by mln::operator==().

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 286 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>
bool mln::p_edges< G, F >::has ( const psite p  )  const [inline]

Does this site set has site p?

Definition at line 276 of file p_edges.hh.

References mln::p_edges_psite< G, F >::e(), 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 268 of file p_edges.hh.

template<typename P, typename E>
bool mln::internal::site_set_base_< P, E >::is_empty (  )  const [inline, inherited]

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

Is this site set valid?

Definition at line 260 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 305 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 252 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 244 of file p_edges.hh.

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


Friends And Related Function Documentation

template<typename Sl, typename Sr>
p_set< typename Sl::site > diff ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Set theoretic difference of lhs and rhs.

Definition at line 66 of file set/diff.hh.

template<typename Sl, typename Sr>
p_set< typename Sl::site > inter ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Intersection between a couple of point sets.

Definition at line 62 of file set/inter.hh.

template<typename Sl, typename Sr>
bool operator< ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Strict inclusion test between site sets lhs and rhs.

Parameters:
[in] lhs A site set (strictly included?).
[in] rhs Another site set (includer?).

Definition at line 479 of file operators.hh.

template<typename S>
std::ostream & operator<< ( std::ostream &  ostr,
const Site_Set< S > &  set 
) [related, inherited]

Print a site set set into the output stream ostr.

Parameters:
[in,out] ostr An output stream.
[in] set A site set.
Returns:
The modified output stream ostr.

Definition at line 505 of file operators.hh.

template<typename Sl, typename Sr>
bool operator<= ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Inclusion test between site sets lhs and rhs.

Parameters:
[in] lhs A site set (included?).
[in] rhs Another site set (includer?).

Definition at line 491 of file operators.hh.

template<typename Sl, typename Sr>
bool operator== ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Equality test between site sets lhs and rhs.

Parameters:
[in] lhs A site set.
[in] rhs Another site set.

Definition at line 467 of file operators.hh.

template<typename Sl, typename Sr>
p_set< typename Sl::site > sym_diff ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Set theoretic symmetrical difference of lhs and rhs.

Definition at line 65 of file sym_diff.hh.

template<typename Sl, typename Sr>
p_set< typename Sl::site > uni ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Union of a couple of point sets.

Definition at line 61 of file uni.hh.

template<typename S>
p_set< typename S::site > unique ( const Site_Set< S > &  s  )  [related, inherited]

Give the unique set of s.

Definition at line 61 of file unique.hh.


Member Data Documentation

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
mln::p_edges< G, F >::__pad0__ [package]

Definition at line 75 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
F mln::p_edges< G, F >::f_ [private]

Definition at line 171 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
G mln::p_edges< G, F >::g_ [private]

Definition at line 170 of file p_edges.hh.

template<typename G, typename F = util::internal::id2element<G,util::edge<G> >>
self_ mln::p_edges< G, F >::super_ [package]

Definition at line 75 of file p_edges.hh.


Generated on Sun Apr 25 01:56:24 2010 for Milena (Olena) by  doxygen 1.5.6