Base class for undirected graphs. More...
#include <graph_base.hh>
Public Types | |
typedef Graph< void > | category |
typedef E | exact_t |
Public Member Functions | |
void | invalidate () |
Invalidate the graph. | |
bool | is_valid () const |
Return true if this graph is valid. | |
void | print_debug (std::ostream &ostr) const |
Print on ostr the graph. | |
const void * | id () const |
Misc. | |
bool | has (const util::vertex< E > &v) const |
Vertex oriented methodsCheck whether a vertex v exists in the graph. | |
bool | has (const util::edge< E > &e) const |
Edge oriented methodsCheck whether an edge e exists in the graph. | |
vertex_id_t | v_other (const edge_id_t &id_e, const vertex_id_t &id_v) const |
Vertex and edge oriented methods. | |
Protected Types | |
typedef ord_pair< vertex_id_t > | edge_data_t |
Internal edge data type. | |
typedef util::edge< E > | edge_t |
The type of an edge. | |
typedef std::vector< edge_id_t > | vertex_data_t |
Internal vertex data type. | |
typedef util::vertex< E > | vertex_t |
The type of a vertex. | |
Protected Member Functions | |
graph_base () | |
Constructor. | |
Protected Attributes | |
util::tracked_ptr < mln::internal::data< E > > | data_ |
Internal data, sharable by several graphs. |
Base class for undirected graphs.
typedef Graph<void> mln::Graph< E >::category [inherited] |
Reimplemented from mln::Object< E >.
typedef ord_pair<vertex_id_t> mln::util::internal::graph_base< E >::edge_data_t [protected] |
Internal edge data type.
Reimplemented in mln::util::graph, and mln::util::line_graph< G >.
typedef util::edge<E> mln::util::internal::graph_base< E >::edge_t [protected] |
The type of an edge.
Reimplemented in mln::util::line_graph< G >.
typedef E mln::Object< E >::exact_t [inherited] |
typedef std::vector<edge_id_t> mln::util::internal::graph_base< E >::vertex_data_t [protected] |
Internal vertex data type.
Reimplemented in mln::util::graph, and mln::util::line_graph< G >.
typedef util::vertex<E> mln::util::internal::graph_base< E >::vertex_t [protected] |
The type of a vertex.
Reimplemented in mln::util::line_graph< G >.
mln::util::internal::graph_base< E >::graph_base | ( | ) | [inline, protected] |
Constructor.
bool mln::util::internal::graph_base< E >::has | ( | const util::vertex< E > & | v | ) | const [inline] |
Vertex oriented methodsCheck whether a vertex v
exists in the graph.
References mln::exact(), and mln::util::vertex< G >::id().
bool mln::util::internal::graph_base< E >::has | ( | const util::edge< E > & | e | ) | const [inline] |
Edge oriented methodsCheck whether an edge e
exists in the graph.
References mln::exact(), and mln::util::edge< G >::id().
const void * mln::util::internal::graph_base< E >::id | ( | ) | const [inline] |
Misc.
methods
Returns the graph id, the "this" pointer.
References mln::util::internal::graph_base< E >::data_, and mln::util::tracked_ptr< T >::ptr_.
Referenced by mln::operator==().
void mln::Graph< E >::invalidate | ( | ) | [inline, inherited] |
Invalidate the graph.
FIXME: does nothing!
bool mln::Graph< E >::is_valid | ( | ) | const [inline, inherited] |
Return true if this graph is valid.
FIXME: currently it always returns true.
void mln::util::internal::graph_base< E >::print_debug | ( | std::ostream & | ostr | ) | const [inline] |
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] |
Vertex and edge oriented methods.
Returns the other adjacent vertex id of a given edge id id_e
.
References mln::exact().
util::tracked_ptr< mln::internal::data<E> > mln::util::internal::graph_base< E >::data_ [protected] |
Internal data, sharable by several graphs.
Referenced by mln::util::internal::graph_base< E >::id().