#include <lemon/smart_graph.h>
Inherits GraphExtender< lemon::SmartGraphBase >.
Inheritance diagram for SmartGraph:
Public Member Functions | |
SmartGraph () | |
Constructor. | |
Node | addNode () |
Add a new node to the graph. | |
Edge | addEdge (const Node &s, const Node &t) |
Add a new edge to the graph. | |
void | clear () |
Clear the graph. | |
Node | split (Node n, bool connect=true) |
Split a node. | |
Private Member Functions | |
SmartGraph (const SmartGraph &) | |
SmartGraph is not copy constructible. Use GraphCopy() instead. | |
void | operator= (const SmartGraph &) |
Assignment of SmartGraph to another one is not allowed. Use GraphCopy() instead. | |
Classes | |
class | Snapshot |
Class to make a snapshot of the graph and to restrore to it later. More... |
SmartGraph | ( | const SmartGraph & | ) | [inline, private] |
SmartGraph is not copy constructible. Use GraphCopy() instead.
SmartGraph | ( | ) | [inline] |
Constructor.
void operator= | ( | const SmartGraph & | ) | [inline, private] |
Assignment of SmartGraph to another one is not allowed. Use GraphCopy() instead.
Node addNode | ( | ) | [inline] |
Edge addEdge | ( | const Node & | s, | |
const Node & | t | |||
) | [inline] |
Add a new edge to the graph with source node s
and target node t
.
void clear | ( | ) | [inline] |
Erase all the nodes and edges from the graph.
Reimplemented from GraphExtender.
Node split | ( | Node | n, | |
bool | connect = true | |||
) | [inline] |
This function splits a node. First a new node is added to the graph, then the source of each outgoing edge of n
is moved to this new node. If connect
is true
(this is the default value), then a new edge from n
to the newly created node is also added.
Edge
s referencing a moved edge remain valid. However InEdge
's and OutEdge
's may be invalidated.