Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

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

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.

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


Constructor & Destructor Documentation

olsr::gra::AdjGraph::AdjGraph  ) 
 

Graph constructor

olsr::gra::AdjGraph::AdjGraph const This other  ) 
 

Graph copy constructor


Member Function Documentation

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

Accessor to the set of arcs.

Returns:
reference to the set of arcs

void olsr::gra::AdjGraph::build_asetmap  )  [private]
 

_apset_map update method.

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

Arc insertion method.

  • a arc to be inserted

void olsr::gra::AdjGraph::insert_edge const AdjInfo a  ) 
 

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

  • a the arc to be inserted

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

Node insertion method.

  • n node to be inserted

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

Accessor to the set of nodes.

Returns:
reference to the set of nodes

AdjGraph & olsr::gra::AdjGraph::operator= const This other  ) 
 

Graph assignment operator

void olsr::gra::AdjGraph::remove_arc const AdjInfo a  ) 
 

Arc removal method.

  • a reference to the arc to be removed

void olsr::gra::AdjGraph::remove_arc aset_t::iterator  pos  ) 
 

Arc removal method.

  • pos iterator to the arc to be removed

void olsr::gra::AdjGraph::remove_arc_then_node const AdjInfo a  ) 
 

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

  • a reference to the arc to be removed

void olsr::gra::AdjGraph::remove_arc_then_node aset_t::iterator  pos  ) 
 

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

  • pos iterator to the arc to be removed

void olsr::gra::AdjGraph::remove_edge const AdjInfo a  ) 
 

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

  • a reference to the arc to be removed

void olsr::gra::AdjGraph::remove_edge aset_t::iterator  pos  ) 
 

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

  • pos iterator to the arc to be removed

void olsr::gra::AdjGraph::remove_edge_then_node const AdjInfo a  ) 
 

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

  • a reference to the arc to be removed

void olsr::gra::AdjGraph::remove_edge_then_node aset_t::iterator  pos  ) 
 

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

  • pos iterator to the arc to be removed

void olsr::gra::AdjGraph::remove_node const AdjNode n  ) 
 

Node removal method.

  • n reference to the node to be removed

void olsr::gra::AdjGraph::remove_node nset_t::iterator  pos  ) 
 

Node removal method.

  • pos iterator to the node to be removed

void olsr::gra::AdjGraph::remove_node_if_alone const AdjNode n  ) 
 

Non-connected-node removal method.

  • n reference to the node to be removed

void olsr::gra::AdjGraph::remove_node_if_alone nset_t::iterator  pos  ) 
 

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


Member Data Documentation

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

Map of nodes to connecting arcs.

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

Set of arcs.

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

Set of nodes.


The documentation for this class was generated from the following files:
Generated on Thu Jul 28 21:21:50 2005 for Qolyester daemon by  doxygen 1.4.1