The newly added nodes and edges can be removed using the restore() function. This is the only way for deleting nodes and/or edges from a SmartGraph structure.
#include <lemon/smart_graph.h>
Public Member Functions | |
Snapshot () | |
Default constructor. | |
Snapshot (SmartGraph &gr) | |
Constructor that immediately makes a snapshot. | |
void | save (SmartGraph &gr) |
Make a snapshot. | |
void | restore () |
Undo the changes until the last snapshot. |
Snapshot | ( | SmartGraph & | gr | ) | [inline] |
This constructor immediately makes a snapshot of the given graph.
void save | ( | SmartGraph & | gr | ) | [inline] |
This function makes a snapshot of the given graph. 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(SmartGraph&).