olsr::gra::AdjGraph Class Reference

The graph per se. More...

#include <graph.hh>

List of all members.

Public Types

typedef arcset_t aset_t
 Convenience alias.
typedef nodeset_t nset_t
 Convenience alias.

Public Member Functions

std::string to_string () const
 AdjGraph ()
 AdjGraph (const This &other)
Thisoperator= (const This &other)
const aset_tarcs () const
const nset_tnodes () const
std::pair< nset_t::const_iterator,
bool > 
insert_node (const AdjNode &n)
std::pair< aset_t::const_iterator,
bool > 
insert_arc (const AdjInfo &a)
void insert_edge (const AdjInfo &a)
void remove_arc (aset_t::iterator pos)
void remove_arc (const AdjInfo &a)
void remove_edge (aset_t::iterator pos)
void remove_edge (const AdjInfo &a)
void remove_arc_then_node (aset_t::iterator pos)
void remove_arc_then_node (const AdjInfo &a)
void remove_edge_then_node (aset_t::iterator pos)
void remove_edge_then_node (const AdjInfo &a)
void remove_node (nset_t::iterator pos)
void remove_node (const AdjNode &n)
void remove_node_if_alone (nset_t::iterator pos)
void remove_node_if_alone (const AdjNode &n)

Private Types

typedef AdjGraph This
typedef std::hash_set< const
AdjInfo *, hash_AdjInfo, utl::pequal_to<
AdjInfo > > 
apset_t
 Set of pointers to arc.
typedef std::hash_map< const
AdjNode *, apset_t, hash_AdjNode,
utl::pequal_to< AdjNode > > 
apsetmap_t
 Map from node pointer to apset_t.

Private Member Functions

void build_asetmap ()

Private Attributes

aset_t _aset
 Set of arcs.
nset_t _nset
 Set of nodes.
apsetmap_t _apset_map
 Map of nodes to connecting arcs.


Detailed Description

The graph per se.


Member Typedef Documentation

typedef AdjGraph olsr::gra::AdjGraph::This [private]

std::hash_set< const AdjInfo * > olsr::gra::AdjGraph::apset_t [private]

Set of pointers to arc.

Used to build subsets of the set of arcs.

std::hash_map< const AdjNode *, apset_t > olsr::gra::AdjGraph::apsetmap_t [private]

Map from node pointer to apset_t.

Used to find easily the set of arcs departing of or arriving at a given node.

arcset_t olsr::gra::AdjGraph::aset_t

Convenience alias.

nodeset_t olsr::gra::AdjGraph::nset_t

Convenience alias.


Constructor & Destructor Documentation

olsr::gra::AdjGraph::AdjGraph (  )  [inline]

Graph constructor

olsr::gra::AdjGraph::AdjGraph ( const This other  )  [inline]

Graph copy constructor


Member Function Documentation

std::string olsr::gra::AdjGraph::to_string (  )  const [inline]

AdjGraph & olsr::gra::AdjGraph::operator= ( const This other  )  [inline]

Graph assignment operator

const aset_t& olsr::gra::AdjGraph::arcs (  )  const [inline]

Accessor to the set of arcs.

Returns:
reference to the set of arcs

const nset_t& olsr::gra::AdjGraph::nodes (  )  const [inline]

Accessor to the set of nodes.

Returns:
reference to the set of nodes

std::pair< AdjGraph::nset_t::const_iterator, bool > olsr::gra::AdjGraph::insert_node ( const AdjNode n  )  [inline]

Node insertion method.

std::pair< AdjGraph::aset_t::const_iterator, bool > olsr::gra::AdjGraph::insert_arc ( const AdjInfo a  )  [inline]

Arc insertion method.

void olsr::gra::AdjGraph::insert_edge ( const AdjInfo a  )  [inline]

Edge insertion method. Inserts both the arc and the inverted arc.

void olsr::gra::AdjGraph::remove_arc ( aset_t::iterator  pos  )  [inline]

Arc removal method.

void olsr::gra::AdjGraph::remove_arc ( const AdjInfo a  )  [inline]

Arc removal method.

void olsr::gra::AdjGraph::remove_edge ( aset_t::iterator  pos  )  [inline]

Edge removal method. Removes both the arc and the inverted arc.

void olsr::gra::AdjGraph::remove_edge ( const AdjInfo a  )  [inline]

Edge removal method. Removed both the arc and the inverted arc.

void olsr::gra::AdjGraph::remove_arc_then_node ( aset_t::iterator  pos  )  [inline]

Arc removal method. Removes the endpoint nodes if they don't belong to other arcs.

void olsr::gra::AdjGraph::remove_arc_then_node ( const AdjInfo a  )  [inline]

Arc removal method. Removes the endpoint nodes if they don't belong to other arcs.

void olsr::gra::AdjGraph::remove_edge_then_node ( aset_t::iterator  pos  )  [inline]

Edge removal method. Removed both the arc and the inverted arc. Removes the endpoint nodes if they don't belong to other arcs.

void olsr::gra::AdjGraph::remove_edge_then_node ( const AdjInfo a  )  [inline]

Edge removal method. Removed both the arc and the inverted arc. Removes the endpoint nodes if they don't belong to other arcs.

void olsr::gra::AdjGraph::remove_node ( nset_t::iterator  pos  )  [inline]

Node removal method.

void olsr::gra::AdjGraph::remove_node ( const AdjNode n  )  [inline]

Node removal method.

void olsr::gra::AdjGraph::remove_node_if_alone ( nset_t::iterator  pos  )  [inline]

void olsr::gra::AdjGraph::remove_node_if_alone ( const AdjNode n  )  [inline]

Non-connected-node removal method.

void olsr::gra::AdjGraph::build_asetmap (  )  [inline, private]

_apset_map update method.


Member Data Documentation

aset_t olsr::gra::AdjGraph::_aset [private]

Set of arcs.

nset_t olsr::gra::AdjGraph::_nset [private]

Set of nodes.

apsetmap_t olsr::gra::AdjGraph::_apset_map [private]

Map of nodes to connecting arcs.


The documentation for this class was generated from the following files:
Generated on Mon Sep 10 17:02:13 2007 for Qolyester daemon by  doxygen 1.5.1