Changeset 1457:be025fc1b13d in lemon-0.x
- Timestamp:
- 06/09/05 11:47:51 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1937
- Location:
- lemon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/list_graph.h
r1435 r1457 458 458 } 459 459 460 ///\bug What is this used for? 461 /// 462 virtual void build() {} 463 ///\bug What is this used for? 464 /// 465 virtual void clear() {} 466 460 467 void regist(ListGraph &_g) { 461 468 g=&_g; … … 518 525 ///\todo This function might be called undo(). 519 526 void restore() { 527 ListGraph &old_g=*g; 520 528 deregist(); 521 529 while(!added_edges.empty()) { 522 g->erase(added_edges.front());530 old_g.erase(added_edges.front()); 523 531 added_edges.pop_front(); 524 532 } 525 533 while(!added_nodes.empty()) { 526 g->erase(added_nodes.front());534 old_g.erase(added_nodes.front()); 527 535 added_nodes.pop_front(); 528 536 } -
lemon/smart_graph.h
r1435 r1457 281 281 void restoreSnapShot(const SnapShot &s) 282 282 { 283 while(s.edge_num >edges.size()) {283 while(s.edge_num<edges.size()) { 284 284 Parent::getNotifier(Edge()).erase(Edge(edges.size()-1)); 285 285 nodes[edges.back().target].first_in=edges.back().next_in; … … 288 288 } 289 289 //nodes.resize(s.nodes_num); 290 while(s.node_num >nodes.size()) {290 while(s.node_num<nodes.size()) { 291 291 Parent::getNotifier(Node()).erase(Node(nodes.size()-1)); 292 292 nodes.pop_back();
Note: See TracChangeset
for help on using the changeset viewer.