Class to make a snapshot of the digraph and restore it later.
The newly added nodes and arcs can be removed using the restore() function.
#include <lemon/list_graph.h>
Public Member Functions | |
Snapshot () | |
Default constructor. | |
Snapshot (ListDigraph &_digraph) | |
Constructor that immediately makes a snapshot. | |
void | save (ListDigraph &_digraph) |
Make a snapshot. | |
void | restore () |
Undo the changes until the last snapshot. | |
bool | valid () const |
|
inline |
This constructor immediately makes a snapshot of the digraph.
_digraph | The digraph we make a snapshot of. |
|
inline |
Make a snapshot of the digraph.
This function can be called more than once. In case of a repeated call, the previous snapshot gets lost.
_digraph | The digraph we make the snapshot of. |
|
inline |
Undo the changes until the last snapshot created by save().
|
inline |
Gives back true when the snapshot is valid.