The newly added nodes and arcs can be removed using the restore() function. This is the only way for deleting nodes and/or arcs from a SmartDigraph structure.
The validity of the snapshot is not stored due to performance reasons. If you do not use the snapshot correctly, it can cause broken program, invalid or not restored state of the digraph or no change.
#include <lemon/smart_graph.h>
Public Member Functions | |
Snapshot () | |
Default constructor. | |
Snapshot (SmartDigraph &gr) | |
Constructor that immediately makes a snapshot. | |
void | save (SmartDigraph &gr) |
Make a snapshot. | |
void | restore () |
Undo the changes until a snapshot. |
Snapshot | ( | SmartDigraph & | gr | ) | [inline] |
This constructor immediately makes a snapshot of the given digraph.
void save | ( | SmartDigraph & | gr | ) | [inline] |
This function makes a snapshot of the given digraph. It can be called more than once. In case of a repeated call, the previous snapshot gets lost.
void restore | ( | ) | [inline] |
This function undos the changes until the last snapshot created by save() or Snapshot(SmartDigraph&).