An important extra feature of this graph implementation is that its maps are real reference maps.
It conforms to the UGraph concept.
#include <lemon/list_graph.h>
Classes | |
class | Snapshot |
Class to make a snapshot of the graph and restore to it later. More... | |
Public Member Functions | |
ListUGraph () | |
Node | addNode () |
Add a new node to the graph. | |
UEdge | addEdge (const Node &s, const Node &t) |
Add a new edge to the graph. | |
void | changeSource (UEdge e, Node n) |
Changes the source of e to n . | |
void | changeTarget (UEdge e, Node n) |
Changes the target of e to n . | |
void | changeSource (Edge e, Node n) |
Changes the source of e to n . | |
void | changeTarget (Edge e, Node n) |
Changes the target of e to n . | |
void | contract (Node a, Node b, bool r=true) |
Contract two nodes. | |
Private Member Functions | |
ListUGraph (const ListUGraph &) | |
void | operator= (const ListUGraph &) |
ListUGraph | ( | const ListUGraph & | ) | [inline, private] |
ListUGraph is not copy constructible. Use UGraphCopy() instead.
ListUGraph | ( | ) | [inline] |
Constructor.
void operator= | ( | const ListUGraph & | ) | [inline, private] |
Assignment of ListUGraph to another one is not allowed. Use UGraphCopy() instead.
Node addNode | ( | ) | [inline] |
UEdge addEdge | ( | const Node & | s, | |
const Node & | t | |||
) | [inline] |
Add a new edge to the graph with source node s
and target node t
.
Reimplemented from UGraphExtender< ListUGraphBase >.
void changeSource | ( | UEdge | e, | |
Node | n | |||
) | [inline] |
Changes the source of e
to n
EdgeIt
s and InEdgeIt
s referencing the changed edge remain valid. However OutEdgeIt
s are invalidated. void changeTarget | ( | UEdge | e, | |
Node | n | |||
) | [inline] |
Changes the target of e
to n
EdgeIt
s referencing the changed edge remain valid. However the other iterators may be invalidated. void changeSource | ( | Edge | e, | |
Node | n | |||
) | [inline] |
Changes the source of e
to n
. It changes the proper node of the represented undirected edge.
EdgeIt
s and InEdgeIt
s referencing the changed edge remain valid. However OutEdgeIt
s are invalidated. void changeTarget | ( | Edge | e, | |
Node | n | |||
) | [inline] |
Changes the target of e
to n
. It changes the proper node of the represented undirected edge.
EdgeIt
s and OutEdgeIt
s referencing the changed edge remain valid. However InEdgeIt
s are invalidated. void contract | ( | Node | a, | |
Node | b, | |||
bool | r = true | |||
) | [inline] |
This function contracts two nodes.
Node b
will be removed but instead of deleting its neighboring edges, they will be joined to a
. The last parameter r
controls whether to remove loops. true
means that loops will be removed.
EdgeIt
s referencing a moved edge remain valid.