ListGraph::Snapshot Class Reference


Detailed Description

Class to make a snapshot of the graph and restore it later.

The newly added nodes and edges can be removed using the restore() function.

Warning:
Edge and node deletions and other modifications (e.g. changing nodes of edges, contracting nodes) cannot be restored. These events invalidate the snapshot.
#include <lemon/list_graph.h>

List of all members.

Public Member Functions

 Snapshot ()
 Default constructor.
 Snapshot (ListGraph &_graph)
 Constructor that immediately makes a snapshot.
void save (ListGraph &_graph)
 Make a snapshot.
void restore ()
 Undo the changes until the last snapshot.
bool valid () const
 Gives back true when the snapshot is valid.


Constructor & Destructor Documentation

Snapshot (  )  [inline]

Default constructor. To actually make a snapshot you must call save().

Snapshot ( ListGraph _graph  )  [inline]

This constructor immediately makes a snapshot of the graph.

Parameters:
_graph The graph we make a snapshot of.


Member Function Documentation

void save ( ListGraph _graph  )  [inline]

Make a snapshot of the graph.

This function can be called more than once. In case of a repeated call, the previous snapshot gets lost.

Parameters:
_graph The graph we make the snapshot of.

void restore (  )  [inline]

Undo the changes until the last snapshot created by save().

bool valid (  )  const [inline]

Gives back true when the snapshot is valid.


The documentation for this class was generated from the following file:

Generated on Sun Dec 7 10:49:45 2008 for LEMON by  doxygen 1.5.7.1