lemon/smart_graph.h
changeset 1503 97836166605d
parent 1435 8e85e6bbefdf
child 1537 0d9f1a71be27
equal deleted inserted replaced
0:372818da84ad 1:f540540f2e3f
   278     friend class SnapShot;
   278     friend class SnapShot;
   279 
   279 
   280   protected:
   280   protected:
   281     void restoreSnapShot(const SnapShot &s)
   281     void restoreSnapShot(const SnapShot &s)
   282     {
   282     {
   283       while(s.edge_num>edges.size()) {
   283       while(s.edge_num<edges.size()) {
   284 	Parent::getNotifier(Edge()).erase(Edge(edges.size()-1));
   284 	Parent::getNotifier(Edge()).erase(Edge(edges.size()-1));
   285 	nodes[edges.back().target].first_in=edges.back().next_in;
   285 	nodes[edges.back().target].first_in=edges.back().next_in;
   286 	nodes[edges.back().source].first_out=edges.back().next_out;
   286 	nodes[edges.back().source].first_out=edges.back().next_out;
   287 	edges.pop_back();
   287 	edges.pop_back();
   288       }
   288       }
   289       //nodes.resize(s.nodes_num);
   289       //nodes.resize(s.nodes_num);
   290       while(s.node_num>nodes.size()) {
   290       while(s.node_num<nodes.size()) {
   291 	Parent::getNotifier(Node()).erase(Node(nodes.size()-1));
   291 	Parent::getNotifier(Node()).erase(Node(nodes.size()-1));
   292 	nodes.pop_back();
   292 	nodes.pop_back();
   293       }
   293       }
   294     }    
   294     }    
   295 
   295