Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

mln::util::internal::graph_base< E > Class Template Reference

Base class for undirected graphs. More...

#include <graph_base.hh>

Inheritance diagram for mln::util::internal::graph_base< E >:
Inheritance graph

List of all members.

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_tedge_data_t
 Internal edge data type.
typedef util::edge< E > edge_t
 The type of an edge.
typedef std::vector< edge_id_tvertex_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.

Detailed Description

template<typename E>
class mln::util::internal::graph_base< E >

Base class for undirected graphs.


Member Typedef Documentation

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

Reimplemented from mln::Object< E >.

template<typename 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 >.

template<typename E>
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 >.

template<typename E>
typedef E mln::Object< E >::exact_t [inherited]
template<typename E>
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 >.

template<typename E>
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 >.


Constructor & Destructor Documentation

template<typename E >
mln::util::internal::graph_base< E >::graph_base (  )  [inline, protected]

Constructor.


Member Function Documentation

template<typename E>
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().

template<typename E>
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().

template<typename E >
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==().

template<typename E >
void mln::Graph< E >::invalidate (  )  [inline, inherited]

Invalidate the graph.

FIXME: does nothing!

template<typename E >
bool mln::Graph< E >::is_valid (  )  const [inline, inherited]

Return true if this graph is valid.

FIXME: currently it always returns true.

template<typename E >
void mln::util::internal::graph_base< E >::print_debug ( std::ostream &  ostr  )  const [inline]

Print on ostr the graph.

Parameters:
[in] ostr The output stream.

References mln::exact().

template<typename E >
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().


Member Data Documentation

template<typename E>
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().