G
.
More...
#include <line_graph.hh>
Public Types | |
typedef Graph< void > | category |
typedef std::vector< edge_data_t > | edges_t |
The type of the set of edges. | |
typedef E | exact_t |
typedef std::vector < vertex_data_t > | vertices_t |
The type of the set of vertices. | |
typedef mln::internal::edge_bkd_iterator < line_graph< G > > | edge_bkd_iter |
typedef mln::internal::edge_fwd_iterator < line_graph< G > > | edge_fwd_iter |
Edge iterators. | |
typedef edge_fwd_iter | edge_iter |
typedef mln::internal::edge_nbh_edge_bkd_iterator < line_graph< G > > | edge_nbh_edge_bkd_iter |
typedef mln::internal::edge_nbh_edge_fwd_iterator < line_graph< G > > | edge_nbh_edge_fwd_iter |
Edge nbh edge iterators. | |
typedef edge_nbh_edge_fwd_iter | edge_nbh_edge_iter |
typedef mln::internal::vertex_bkd_iterator < line_graph< G > > | vertex_bkd_iter |
typedef mln::internal::vertex_fwd_iterator < line_graph< G > > | vertex_fwd_iter |
Iterator types
Vertex iterators. | |
typedef vertex_fwd_iter | vertex_iter |
typedef mln::internal::vertex_nbh_edge_bkd_iterator < line_graph< G > > | vertex_nbh_edge_bkd_iter |
typedef mln::internal::vertex_nbh_edge_fwd_iterator < line_graph< G > > | vertex_nbh_edge_fwd_iter |
Vertex nbh edge iterators. | |
typedef vertex_nbh_edge_fwd_iter | vertex_nbh_edge_iter |
typedef mln::internal::vertex_nbh_vertex_bkd_iterator < line_graph< G > > | vertex_nbh_vertex_bkd_iter |
typedef mln::internal::vertex_nbh_vertex_fwd_iterator < line_graph< G > > | vertex_nbh_vertex_fwd_iter |
Vertex nbh vertex iterators. | |
typedef vertex_nbh_vertex_fwd_iter | vertex_nbh_vertex_iter |
Public Member Functions | |
const util::tracked_ptr < mln::internal::data< E > > & | data_hook_ () const |
Hook to data; for debugging purpose. | |
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. | |
line_graph (const G &g) | |
line_graph () | |
void | print_debug (std::ostream &ostr) const |
Print on ostr the 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 . | |
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 . | |
bool | has (const util::edge< E > &e) const |
Edge oriented methods | |
bool | has (const util::vertex< E > &v) const |
Vertex oriented methods | |
const void * | id () const |
Misc. | |
void | invalidate () |
Invalidate the graph. | |
bool | is_valid () const |
Return true if this graph is valid. | |
vertex_id_t | v_other (const edge_id_t &id_e, const vertex_id_t &id_v) const |
Vertex and edge oriented methods. | |
vertex_t | vertex (const vertex_id_t &id_v) const |
Vertex oriented. | |
Protected Attributes | |
util::tracked_ptr < mln::internal::data< E > > | data_ |
Internal data, sharable by several graphs. | |
Package Types | |
typedef super::edge_data_t | edge_data_t |
Internal edge data type. | |
typedef super::edge_t | edge_t |
The type of an edge. | |
typedef super::vertex_data_t | vertex_data_t |
Internal vertex data type. | |
typedef super::vertex_t | vertex_t |
The type of a vertex. | |
Package Attributes | |
__pad0__:graph_base< line_graph<G> > super | |
The super class. |
G
.
Definition at line 81 of file line_graph.hh.
typedef Graph<void> mln::Graph< E >::category [inherited] |
typedef mln::internal::edge_bkd_iterator< line_graph<G> > mln::util::line_graph< G >::edge_bkd_iter |
Definition at line 115 of file line_graph.hh.
typedef super::edge_data_t mln::util::line_graph< G >::edge_data_t [package] |
Reimplemented from mln::util::internal::graph_base< E >.
Definition at line 90 of file line_graph.hh.
typedef mln::internal::edge_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::edge_fwd_iter |
typedef edge_fwd_iter mln::util::line_graph< G >::edge_iter |
Definition at line 116 of file line_graph.hh.
typedef mln::internal::edge_nbh_edge_bkd_iterator< line_graph<G> > mln::util::line_graph< G >::edge_nbh_edge_bkd_iter |
Definition at line 124 of file line_graph.hh.
typedef mln::internal::edge_nbh_edge_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::edge_nbh_edge_fwd_iter |
typedef edge_nbh_edge_fwd_iter mln::util::line_graph< G >::edge_nbh_edge_iter |
Definition at line 125 of file line_graph.hh.
typedef super::edge_t mln::util::line_graph< G >::edge_t [package] |
The type of an edge.
Reimplemented from mln::util::internal::graph_base< E >.
Definition at line 87 of file line_graph.hh.
typedef std::vector<edge_data_t> mln::util::line_graph< G >::edges_t |
typedef E mln::Object< E >::exact_t [inherited] |
typedef mln::internal::vertex_bkd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_bkd_iter |
Definition at line 106 of file line_graph.hh.
typedef super::vertex_data_t mln::util::line_graph< G >::vertex_data_t [package] |
Reimplemented from mln::util::internal::graph_base< E >.
Definition at line 89 of file line_graph.hh.
typedef mln::internal::vertex_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_fwd_iter |
typedef vertex_fwd_iter mln::util::line_graph< G >::vertex_iter |
Definition at line 107 of file line_graph.hh.
typedef mln::internal::vertex_nbh_edge_bkd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_nbh_edge_bkd_iter |
Definition at line 142 of file line_graph.hh.
typedef mln::internal::vertex_nbh_edge_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_nbh_edge_fwd_iter |
typedef vertex_nbh_edge_fwd_iter mln::util::line_graph< G >::vertex_nbh_edge_iter |
Definition at line 143 of file line_graph.hh.
typedef mln::internal::vertex_nbh_vertex_bkd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_nbh_vertex_bkd_iter |
Definition at line 133 of file line_graph.hh.
typedef mln::internal::vertex_nbh_vertex_fwd_iterator< line_graph<G> > mln::util::line_graph< G >::vertex_nbh_vertex_fwd_iter |
typedef vertex_nbh_vertex_fwd_iter mln::util::line_graph< G >::vertex_nbh_vertex_iter |
Definition at line 134 of file line_graph.hh.
typedef super::vertex_t mln::util::line_graph< G >::vertex_t [package] |
The type of a vertex.
Reimplemented from mln::util::internal::graph_base< E >.
Definition at line 86 of file line_graph.hh.
typedef std::vector<vertex_data_t> mln::util::line_graph< G >::vertices_t |
mln::util::line_graph< G >::line_graph | ( | ) | [inline] |
Definition at line 293 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_.
mln::util::line_graph< G >::line_graph | ( | const G & | g | ) | [inline] |
Definition at line 300 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_.
const util::tracked_ptr< mln::internal::data< E > > & mln::util::internal::graph_base< E >::data_hook_ | ( | ) | const [inline, inherited] |
Hook to data; for debugging purpose.
Definition at line 266 of file graph_base.hh.
References mln::util::internal::graph_base< E >::data_.
edge_id_t mln::util::line_graph< G >::e_ith_nbh_edge | ( | const edge_id_t & | id_e, | |
unsigned | i | |||
) | const [inline] |
Return the i
th edge adjacent to the edge id_e
.
Definition at line 454 of file line_graph.hh.
References mln::util::line_graph< G >::e_nmax(), mln::util::line_graph< G >::e_nmax_nbh_edges(), mln::util::line_graph< G >::has_e(), mln::util::line_graph< G >::v1(), mln::util::line_graph< G >::v2(), mln::util::line_graph< G >::v_ith_nbh_edge(), and mln::util::line_graph< G >::v_nmax_nbh_edges().
size_t mln::util::line_graph< G >::e_nmax | ( | ) | const [inline] |
Return the number of edges in the graph.
Definition at line 402 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_.
Referenced by mln::util::line_graph< G >::e_ith_nbh_edge(), and mln::util::line_graph< G >::edge().
size_t mln::util::line_graph< G >::e_nmax_nbh_edges | ( | const edge_id_t & | id_e | ) | const [inline] |
Return the number max of adjacent edge, given an edge id_e
.
Definition at line 445 of file line_graph.hh.
References mln::util::line_graph< G >::has_e(), mln::util::line_graph< G >::v1(), mln::util::line_graph< G >::v2(), and mln::util::line_graph< G >::v_nmax_nbh_edges().
Referenced by mln::util::line_graph< G >::e_ith_nbh_edge().
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 393 of file line_graph.hh.
References mln::util::line_graph< G >::e_nmax().
const G & mln::util::line_graph< G >::graph | ( | ) | const [inline] |
Return the underlying graph.
Definition at line 479 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_.
bool mln::util::internal::graph_base< E >::has | ( | const util::edge< E > & | e | ) | const [inline, inherited] |
Edge oriented methods
Check whether an edge e
exists in the graph.
Definition at line 211 of file graph_base.hh.
References mln::exact(), and mln::util::edge< G >::id().
bool mln::util::internal::graph_base< E >::has | ( | const util::vertex< E > & | v | ) | const [inline, inherited] |
Vertex oriented methods
Check whether a vertex v
exists in the graph.
Definition at line 199 of file graph_base.hh.
References mln::exact(), and mln::util::vertex< G >::id().
bool mln::util::line_graph< G >::has | ( | const util::edge< G2 > & | e | ) | const [inline] |
Return whether e
is in the graph.
Definition at line 419 of file line_graph.hh.
References mln::util::edge< G >::graph(), mln::util::line_graph< G >::has_e(), and mln::util::edge< G >::id().
bool mln::util::line_graph< G >::has | ( | const util::vertex< G2 > & | v | ) | const [inline] |
Check whether an edge v
exists in the graph.
Definition at line 339 of file line_graph.hh.
References mln::util::vertex< G >::graph(), mln::util::line_graph< G >::has_v(), and mln::util::vertex< G >::id().
bool mln::util::line_graph< G >::has_e | ( | const util::edge_id_t & | id_e | ) | const [inline] |
Return whether id_e
is in the graph.
Definition at line 410 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_.
Referenced by mln::util::line_graph< G >::e_ith_nbh_edge(), mln::util::line_graph< G >::e_nmax_nbh_edges(), mln::util::line_graph< G >::has(), mln::util::line_graph< G >::v1(), and mln::util::line_graph< G >::v2().
bool mln::util::line_graph< G >::has_v | ( | const vertex_id_t & | id_v | ) | const [inline] |
Check whether a vertex id id_v
exists in the graph.
Definition at line 330 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_.
Referenced by mln::util::line_graph< G >::has(), mln::util::line_graph< G >::v_ith_nbh_edge(), mln::util::line_graph< G >::v_ith_nbh_vertex(), mln::util::line_graph< G >::v_nmax_nbh_edges(), mln::util::line_graph< G >::v_nmax_nbh_vertices(), and mln::util::line_graph< G >::vertex().
const void * mln::util::internal::graph_base< E >::id | ( | ) | const [inline, inherited] |
Misc.
methods
Returns the graph id, the "this" pointer.
Definition at line 167 of file graph_base.hh.
References mln::util::internal::graph_base< E >::data_, and mln::util::tracked_ptr< T >::ptr_.
Referenced by mln::util::line_graph< G >::is_subgraph_of(), mln::util::graph::is_subgraph_of(), and mln::operator==().
void mln::util::internal::graph_base< E >::invalidate | ( | ) | [inline, inherited] |
Invalidate the graph.
Definition at line 228 of file graph_base.hh.
References mln::util::tracked_ptr< T >::clean_(), and mln::util::internal::graph_base< E >::data_.
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 471 of file line_graph.hh.
References mln::util::internal::graph_base< E >::id().
bool mln::util::internal::graph_base< E >::is_valid | ( | ) | const [inline, inherited] |
Return true if this graph is valid.
Definition at line 220 of file graph_base.hh.
References mln::util::internal::graph_base< E >::data_.
void mln::util::internal::graph_base< E >::print_debug | ( | std::ostream & | ostr | ) | const [inline, inherited] |
Print on ostr
the graph.
[in] | ostr | The output stream. |
Definition at line 241 of file graph_base.hh.
References mln::exact().
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 427 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_, and 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().
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 436 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_, and 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().
edge_id_t mln::util::line_graph< G >::v_ith_nbh_edge | ( | const vertex_id_t & | id_v, | |
unsigned | i | |||
) | const [inline] |
Returns the i
th edge adjacent to the vertex id_v
.
Definition at line 357 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_, mln::util::line_graph< G >::has_v(), mln::util::line_graph< G >::v_nmax(), and mln::util::line_graph< G >::v_nmax_nbh_edges().
Referenced by mln::util::line_graph< G >::e_ith_nbh_edge(), and mln::util::line_graph< G >::v_ith_nbh_vertex().
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 377 of file line_graph.hh.
References mln::util::line_graph< G >::has_v(), mln::util::line_graph< G >::v_ith_nbh_edge(), and mln::util::internal::graph_base< E >::v_other().
size_t mln::util::line_graph< G >::v_nmax | ( | ) | const [inline] |
Return the number of vertices in the graph.
Definition at line 322 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_.
Referenced by mln::util::line_graph< G >::v_ith_nbh_edge().
size_t mln::util::line_graph< G >::v_nmax_nbh_edges | ( | const vertex_id_t & | id_v | ) | const [inline] |
Return the number of adjacent edges of vertex id_v
.
Definition at line 348 of file line_graph.hh.
References mln::util::internal::graph_base< E >::data_, and mln::util::line_graph< G >::has_v().
Referenced by mln::util::line_graph< G >::e_ith_nbh_edge(), mln::util::line_graph< G >::e_nmax_nbh_edges(), mln::util::line_graph< G >::v_ith_nbh_edge(), and mln::util::line_graph< G >::v_nmax_nbh_vertices().
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 368 of file line_graph.hh.
References mln::util::line_graph< G >::has_v(), and mln::util::line_graph< G >::v_nmax_nbh_edges().
vertex_id_t mln::util::internal::graph_base< E >::v_other | ( | const edge_id_t & | id_e, | |
const vertex_id_t & | id_v | |||
) | const [inline, inherited] |
Vertex and edge oriented methods.
Returns the other adjacent vertex id of a given edge id id_e
.
Definition at line 179 of file graph_base.hh.
References mln::exact().
Referenced by mln::util::line_graph< G >::v_ith_nbh_vertex(), and mln::util::graph::v_ith_nbh_vertex().
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 312 of file line_graph.hh.
References mln::util::line_graph< G >::has_v().
mln::util::line_graph< G >::__pad0__ [package] |
util::tracked_ptr< mln::internal::data<E> > mln::util::internal::graph_base< E >::data_ [protected, inherited] |
Internal data, sharable by several graphs.
Definition at line 126 of file graph_base.hh.
Referenced by mln::util::graph::add_edge(), mln::util::graph::add_vertex(), mln::util::graph::add_vertices(), mln::util::internal::graph_base< E >::data_hook_(), mln::util::line_graph< G >::e_nmax(), mln::util::graph::e_nmax(), mln::util::graph::edge(), mln::util::graph::edges(), mln::util::line_graph< G >::graph(), mln::util::graph::graph(), mln::util::line_graph< G >::has_e(), mln::util::graph::has_e(), mln::util::line_graph< G >::has_v(), mln::util::graph::has_v(), mln::util::internal::graph_base< E >::id(), mln::util::internal::graph_base< E >::invalidate(), mln::util::internal::graph_base< E >::is_valid(), mln::util::line_graph< G >::line_graph(), mln::util::line_graph< G >::v1(), mln::util::graph::v1(), mln::util::line_graph< G >::v2(), mln::util::graph::v2(), mln::util::line_graph< G >::v_ith_nbh_edge(), mln::util::graph::v_ith_nbh_edge(), mln::util::line_graph< G >::v_nmax(), mln::util::graph::v_nmax(), mln::util::line_graph< G >::v_nmax_nbh_edges(), and mln::util::graph::v_nmax_nbh_edges().