mln::util::line_graph< G > Class Template Reference
[Graphes]

Undirected line graph of a graph of type G. More...

#include <line_graph.hh>

Inherits graph_base< line_graph< G > >.

List of all members.

Public Types

typedef std::vector< edge_data_t > edges_t
 The type of the set of edges.
typedef std::vector
< vertex_data_t > 
vertices_t
 The type of the set of vertices.
typedef
mln::internal::edge_fwd_iterator
< line_graph< G > > 
edge_fwd_iter
 Edge iterators.
typedef
mln::internal::edge_nbh_edge_fwd_iterator
< line_graph< G > > 
edge_nbh_edge_fwd_iter
 Edge nbh edge iterators.
typedef
mln::internal::vertex_fwd_iterator
< line_graph< G > > 
vertex_fwd_iter
 Iterator types

Vertex iterators.

typedef
mln::internal::vertex_nbh_edge_fwd_iterator
< line_graph< G > > 
vertex_nbh_edge_fwd_iter
 Vertex nbh edge iterators.
typedef
mln::internal::vertex_nbh_vertex_fwd_iterator
< line_graph< G > > 
vertex_nbh_vertex_fwd_iter
 Vertex nbh vertex iterators.

Public Member Functions

template<typename G2 >
bool has (const util::vertex< G2 > &v) const
 Check whether an edge v exists in the graph.
bool has_v (const vertex_id_t &id_v) const
 Check whether a vertex id id_v exists in the graph.
void invalidate ()
 Invalidate the graph.
bool is_valid () const
 Return true if this graph is valid.
edge_id_t v_ith_nbh_edge (const vertex_id_t &id_v, unsigned i) const
 Returns the i th edge adjacent to the vertex id_v.
vertex_id_t v_ith_nbh_vertex (const vertex_id_t &id_v, unsigned i) const
 Returns the i th vertex adjacent to the vertex id_v.
size_t v_nmax () const
 Return the number of vertices in the graph.
size_t v_nmax_nbh_edges (const vertex_id_t &id_v) const
 Return the number of adjacent edges of vertex id_v.
size_t v_nmax_nbh_vertices (const vertex_id_t &id_v) const
 Return the number of adjacent vertices of vertex id_v.
edge_id_t e_ith_nbh_edge (const edge_id_t &id_e, unsigned i) const
 Return the i th edge adjacent to the edge id_e.
size_t e_nmax () const
 Return the number of edges in the graph.
size_t e_nmax_nbh_edges (const edge_id_t &id_e) const
 Return the number max of adjacent edge, given an edge id_e.
edge_t edge (const edge_id_t &e) const
 Edge oriented.
const G & graph () const
 Return the underlying graph.
template<typename G2 >
bool has (const util::edge< G2 > &e) const
 Return whether e is in the graph.
bool has_e (const util::edge_id_t &id_e) const
 Return whether id_e is in the graph.
template<typename G2 >
bool is_subgraph_of (const G2 &g) const
 Return whether this graph is a subgraph Return true if g and *this have the same graph_id.
vertex_id_t v1 (const edge_id_t &id_e) const
 Return the first vertex associated to the edge id_e.
vertex_id_t v2 (const edge_id_t &id_e) const
 Return the second vertex associated to edge id_e.
vertex_t vertex (const vertex_id_t &id_v) const
 Vertex oriented.


Detailed Description

template<typename G>
class mln::util::line_graph< G >

Undirected line graph of a graph of type G.

Member Typedef Documentation

template<typename G>
typedef mln::internal::edge_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::edge_fwd_iter

Edge iterators.

template<typename G>
typedef mln::internal::edge_nbh_edge_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::edge_nbh_edge_fwd_iter

Edge nbh edge iterators.

template<typename G>
typedef std::vector<edge_data_t> mln::util::line_graph< G >::edges_t

The type of the set of edges.

template<typename G>
typedef mln::internal::vertex_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_fwd_iter

Iterator types

Vertex iterators.

template<typename G>
typedef mln::internal::vertex_nbh_edge_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_nbh_edge_fwd_iter

Vertex nbh edge iterators.

template<typename G>
typedef mln::internal::vertex_nbh_vertex_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_nbh_vertex_fwd_iter

Vertex nbh vertex iterators.

template<typename G>
typedef std::vector<vertex_data_t> mln::util::line_graph< G >::vertices_t

The type of the set of vertices.


Member Function Documentation

template<typename G >
edge_id_t mln::util::line_graph< G >::e_ith_nbh_edge ( const edge_id_t id_e,
unsigned  i 
) const [inline]

template<typename G >
size_t mln::util::line_graph< G >::e_nmax (  )  const [inline]

Return the number of edges in the graph.

Referenced by mln::util::line_graph< G >::e_ith_nbh_edge(), and mln::util::line_graph< G >::edge().

template<typename G >
size_t mln::util::line_graph< G >::e_nmax_nbh_edges ( const edge_id_t id_e  )  const [inline]

template<typename G >
line_graph< G >::edge_t mln::util::line_graph< G >::edge ( const edge_id_t e  )  const [inline]

Edge oriented.

Return the edge whose id is e.

References mln::util::line_graph< G >::e_nmax().

template<typename G >
const G & mln::util::line_graph< G >::graph (  )  const [inline]

Return the underlying graph.

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

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

template<typename G >
bool mln::util::line_graph< G >::has_e ( const util::edge_id_t id_e  )  const [inline]

template<typename G >
bool mln::util::line_graph< G >::has_v ( const vertex_id_t id_v  )  const [inline]

void mln::Graph< line_graph< G > >::invalidate (  )  [inherited]

Invalidate the graph.

FIXME: does nothing!

template<typename G >
template<typename G2 >
bool mln::util::line_graph< G >::is_subgraph_of ( const G2 &  g  )  const [inline]

Return whether this graph is a subgraph Return true if g and *this have the same graph_id.

bool mln::Graph< line_graph< G > >::is_valid (  )  const [inherited]

Return true if this graph is valid.

FIXME: currently it always returns true.

template<typename G >
vertex_id_t mln::util::line_graph< G >::v1 ( const edge_id_t id_e  )  const [inline]

template<typename G >
vertex_id_t mln::util::line_graph< G >::v2 ( const edge_id_t id_e  )  const [inline]

template<typename G >
edge_id_t mln::util::line_graph< G >::v_ith_nbh_edge ( const vertex_id_t id_v,
unsigned  i 
) const [inline]

template<typename G >
vertex_id_t mln::util::line_graph< G >::v_ith_nbh_vertex ( const vertex_id_t id_v,
unsigned  i 
) const [inline]

Returns the i th vertex adjacent to the vertex id_v.

References mln::util::line_graph< G >::has_v(), and mln::util::line_graph< G >::v_ith_nbh_edge().

template<typename G >
size_t mln::util::line_graph< G >::v_nmax (  )  const [inline]

Return the number of vertices in the graph.

Referenced by mln::util::line_graph< G >::v_ith_nbh_edge().

template<typename G >
size_t mln::util::line_graph< G >::v_nmax_nbh_edges ( const vertex_id_t id_v  )  const [inline]

template<typename G >
size_t mln::util::line_graph< G >::v_nmax_nbh_vertices ( const vertex_id_t id_v  )  const [inline]

Return the number of adjacent vertices of vertex id_v.

References mln::util::line_graph< G >::has_v(), and mln::util::line_graph< G >::v_nmax_nbh_edges().

template<typename G >
line_graph< G >::vertex_t mln::util::line_graph< G >::vertex ( const vertex_id_t id_v  )  const [inline]

Vertex oriented.

Shortcuts factoring the insertion of vertices and edges.

Return the vertex whose id is v.

References mln::util::line_graph< G >::has_v().


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