Public Types | Public Member Functions

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::vertex_fwd_iterator
< line_graph< G > > 
vertex_fwd_iter
 Iterator typesVertex iterators.

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_nbh_vertex_fwd_iterator
< line_graph< G > > 
vertex_nbh_vertex_fwd_iter
 Vertex nbh vertex iterators.

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

Public Member Functions

template<typename G2 >
bool has (const util::vertex< G2 > &v) const
 Check whether a vertex v exists in the line graph.
bool has_v (const vertex_id_t &id_v) const
 Check whether a vertex id id_v exists in the line graph.
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.

vertex_t vertex (const vertex_id_t &id_v) const
 Vertex oriented.

edge_t edge (const edge_id_t &e) const
 Edge oriented.
size_t e_nmax () const
 Return the number of edges in the graph.
bool has_e (const util::edge_id_t &id_e) const
 Return whether id_e is in the line graph.
template<typename G2 >
bool has (const util::edge< G2 > &e) const
 Return whether e is in the line graph.
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.
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_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.
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.
const G & graph () const
 Return the underlying graph.

Detailed Description

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

Undirected line graph of a graph of type G.

Definition at line 82 of file line_graph.hh.


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.

Definition at line 114 of file line_graph.hh.

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.

Definition at line 123 of file line_graph.hh.

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

The type of the set of edges.

Definition at line 98 of file line_graph.hh.

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

Iterator typesVertex iterators.

Definition at line 105 of file line_graph.hh.

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.

Definition at line 141 of file line_graph.hh.

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.

Definition at line 132 of file line_graph.hh.

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

The type of the set of vertices.

Definition at line 95 of file line_graph.hh.


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.

Definition at line 408 of file line_graph.hh.

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.

Definition at line 399 of file line_graph.hh.

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.

Definition at line 485 of file line_graph.hh.

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

Check whether a vertex v exists in the line graph.

Definition at line 345 of file line_graph.hh.

References mln::util::vertex< G >::graph(), mln::util::line_graph< G >::has_v(), and mln::util::vertex< G >::id().

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

Return whether e is in the line graph.

Definition at line 425 of file line_graph.hh.

References mln::util::edge< G >::graph(), mln::util::line_graph< G >::has_e(), and mln::util::edge< G >::id().

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]
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.

Definition at line 477 of file line_graph.hh.

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

Return the first vertex associated to the edge id_e.

Definition at line 433 of file line_graph.hh.

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

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

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

Return the second vertex associated to edge id_e.

Definition at line 442 of file line_graph.hh.

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

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

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.

Definition at line 383 of file line_graph.hh.

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.

Definition at line 328 of file line_graph.hh.

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.

Definition at line 374 of file line_graph.hh.

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.

Definition at line 318 of file line_graph.hh.

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