#include <graph.hh>
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) | |
| This & | operator= (const This &other) |
| const aset_t & | arcs () const |
| const nset_t & | nodes () 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. | |
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.
Convenience alias.
Convenience alias.
| olsr::gra::AdjGraph::AdjGraph | ( | ) | [inline] |
Graph constructor
| olsr::gra::AdjGraph::AdjGraph | ( | const This & | other | ) | [inline] |
Graph copy constructor
| std::string olsr::gra::AdjGraph::to_string | ( | ) | const [inline] |
| const aset_t& olsr::gra::AdjGraph::arcs | ( | ) | const [inline] |
Accessor to the set of arcs.
| const nset_t& olsr::gra::AdjGraph::nodes | ( | ) | const [inline] |
Accessor 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.
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.
1.5.1