lemon/list_graph.h
changeset 740 819ca5b50de0
parent 738 456fa5bc3256
child 741 10c9c3a35b83
equal deleted inserted replaced
22:586e5ad0215b 24:0d3ad216186d
   749 
   749 
   750       /// \brief Undo the changes until the last snapshot.
   750       /// \brief Undo the changes until the last snapshot.
   751       ///
   751       ///
   752       /// This function undos the changes until the last snapshot
   752       /// This function undos the changes until the last snapshot
   753       /// created by save() or Snapshot(ListDigraph&).
   753       /// created by save() or Snapshot(ListDigraph&).
       
   754       ///
       
   755       /// \warning This method invalidates the snapshot, i.e. repeated
       
   756       /// restoring is not supported unless you call save() again.
   754       void restore() {
   757       void restore() {
   755         detach();
   758         detach();
   756         for(std::list<Arc>::iterator it = added_arcs.begin();
   759         for(std::list<Arc>::iterator it = added_arcs.begin();
   757             it != added_arcs.end(); ++it) {
   760             it != added_arcs.end(); ++it) {
   758           digraph->erase(*it);
   761           digraph->erase(*it);
  1548 
  1551 
  1549       /// \brief Undo the changes until the last snapshot.
  1552       /// \brief Undo the changes until the last snapshot.
  1550       ///
  1553       ///
  1551       /// This function undos the changes until the last snapshot
  1554       /// This function undos the changes until the last snapshot
  1552       /// created by save() or Snapshot(ListGraph&).
  1555       /// created by save() or Snapshot(ListGraph&).
       
  1556       ///
       
  1557       /// \warning This method invalidates the snapshot, i.e. repeated
       
  1558       /// restoring is not supported unless you call save() again.
  1553       void restore() {
  1559       void restore() {
  1554         detach();
  1560         detach();
  1555         for(std::list<Edge>::iterator it = added_edges.begin();
  1561         for(std::list<Edge>::iterator it = added_edges.begin();
  1556             it != added_edges.end(); ++it) {
  1562             it != added_edges.end(); ++it) {
  1557           graph->erase(*it);
  1563           graph->erase(*it);