Public Types | Public Member Functions | 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 ord_pair< vertex_id_tedge_data_t
 Internal edge data type.
typedef util::edge< E > edge_t
 The type of an edge.
typedef E exact_t
typedef std::vector< edge_id_tvertex_data_t
 Internal vertex data type.
typedef util::vertex< E > vertex_t
 The type of a vertex.

Public Member Functions

const util::tracked_ptr
< mln::internal::data< E > > & 
data_hook_ () const
 Hook to data; for debugging purpose.
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.
bool is_valid () const
 Return true if this graph is valid.
void invalidate ()
 Invalidate the graph.

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.

Definition at line 65 of file graph_base.hh.


Member Typedef Documentation

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

Reimplemented from mln::Object< E >.

Definition at line 59 of file mln/core/concept/graph.hh.

template<typename E>
typedef ord_pair<vertex_id_t> mln::util::internal::graph_base< E >::edge_data_t

Internal edge data type.

Reimplemented in mln::util::graph, and mln::util::line_graph< G >.

Definition at line 78 of file graph_base.hh.

template<typename E>
typedef util::edge<E> mln::util::internal::graph_base< E >::edge_t

The type of an edge.

Reimplemented in mln::util::line_graph< G >.

Definition at line 72 of file graph_base.hh.

template<typename E>
typedef E mln::Object< E >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename E>
typedef std::vector<edge_id_t> mln::util::internal::graph_base< E >::vertex_data_t

Internal vertex data type.

Reimplemented in mln::util::graph, and mln::util::line_graph< G >.

Definition at line 75 of file graph_base.hh.

template<typename E>
typedef util::vertex<E> mln::util::internal::graph_base< E >::vertex_t

The type of a vertex.

Reimplemented in mln::util::line_graph< G >.

Definition at line 70 of file graph_base.hh.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 156 of file graph_base.hh.


Member Function Documentation

template<typename E >
const util::tracked_ptr< mln::internal::data< E > > & mln::util::internal::graph_base< E >::data_hook_ (  )  const [inline]

Hook to data; for debugging purpose.

Definition at line 266 of file graph_base.hh.

References mln::util::internal::graph_base< E >::data_.

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.

Definition at line 199 of file graph_base.hh.

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.

Definition at line 211 of file graph_base.hh.

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.

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::operator==().

template<typename E >
void mln::util::internal::graph_base< E >::invalidate (  )  [inline]

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

template<typename E >
bool mln::util::internal::graph_base< E >::is_valid (  )  const [inline]

Return true if this graph is valid.

Definition at line 220 of file graph_base.hh.

References mln::util::internal::graph_base< E >::data_.

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.

Definition at line 241 of file graph_base.hh.

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.

Definition at line 179 of file graph_base.hh.

References mln::exact().


Member Data Documentation

template<typename E>
util::tracked_ptr< mln::internal::data<E> > mln::util::internal::graph_base< E >::data_ [protected]