#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. |
|
Set of pointers to arc. Used to build subsets of the set of arcs. |
|
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.
|
|
|
|
Graph constructor |
|
Graph copy constructor |
|
Accessor to the set of arcs.
|
|
_apset_map update method. |
|
Arc insertion method.
|
|
Edge insertion method. Inserts both the arc and the inverted arc.
|
|
Node insertion method.
|
|
Accessor to the set of nodes.
|
|
Graph assignment operator |
|
Arc removal method.
|
|
Arc removal method.
|
|
Arc removal method. Removes the endpoint nodes if they don't belong to other arcs.
|
|
Arc removal method. Removes the endpoint nodes if they don't belong to other arcs.
|
|
Edge removal method. Removed both the arc and the inverted arc.
|
|
Edge removal method. Removes both the arc and the inverted arc.
|
|
Edge removal method. Removed both the arc and the inverted arc. Removes the endpoint nodes if they don't belong to other arcs.
|
|
Edge removal method. Removed both the arc and the inverted arc. Removes the endpoint nodes if they don't belong to other arcs.
|
|
Node removal method.
|
|
Node removal method.
|
|
Non-connected-node removal method.
|
|
|
|
|
|
Map of nodes to connecting arcs.
|
|
Set of arcs.
|
|
Set of nodes.
|