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.
- Note
- After a state is restored, you cannot restore a later state, i.e. you cannot add the removed nodes and arcs again using another Snapshot instance.
- Warning
- Node and arc deletions and other modifications (e.g. reversing, contracting, splitting arcs or nodes) cannot be restored. These events invalidate the snapshot. However, the arcs and nodes that were added to the digraph after making the current snapshot can be removed without invalidating it.