Changeset 2381:0248790c66ea in lemon0.x for lemon/smart_graph.h
 Timestamp:
 03/01/07 17:47:23 (13 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3212
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/smart_graph.h
r2350 r2381 287 287 while(s.edge_num<edges.size()) { 288 288 Edge edge = edgeFromId(edges.size()1); 289 Parent:: getNotifier(Edge()).erase(edge);289 Parent::notifier(Edge()).erase(edge); 290 290 nodes[edges.back().source].first_out=edges.back().next_out; 291 291 nodes[edges.back().target].first_in=edges.back().next_in; … … 294 294 while(s.node_num<nodes.size()) { 295 295 Node node = nodeFromId(nodes.size()1); 296 Parent:: getNotifier(Node()).erase(node);296 Parent::notifier(Node()).erase(node); 297 297 nodes.pop_back(); 298 298 } … … 506 506 void firstInc(UEdge &edge, bool& d, const Node& v) const { 507 507 int de = nodes[v.id].first_out; 508 edge.id = de / 2; 509 d = ((de & 1) == 1); 508 if (de != 1) { 509 edge.id = de / 2; 510 d = ((de & 1) == 1); 511 } else { 512 edge.id = 1; 513 d = true; 514 } 510 515 } 511 516 void nextInc(UEdge &edge, bool& d) const { 512 517 int de = (edges[(edge.id * 2)  (d ? 1 : 0)].next_out); 513 edge.id = de / 2; 514 d = ((de & 1) == 1); 518 if (de != 1) { 519 edge.id = de / 2; 520 d = ((de & 1) == 1); 521 } else { 522 edge.id = 1; 523 d = true; 524 } 515 525 } 516 526 … … 642 652 int n=edges.size()1; 643 653 UEdge edge=uEdgeFromId(n/2); 644 Parent:: getNotifier(UEdge()).erase(edge);654 Parent::notifier(UEdge()).erase(edge); 645 655 std::vector<Edge> dir; 646 656 dir.push_back(edgeFromId(n)); 647 657 dir.push_back(edgeFromId(n1)); 648 Parent:: getNotifier(Edge()).erase(dir);658 Parent::notifier(Edge()).erase(dir); 649 659 nodes[edges[n].target].first_out=edges[n].next_out; 650 660 nodes[edges[n1].target].first_out=edges[n1].next_out; … … 655 665 int n=nodes.size()1; 656 666 Node node = nodeFromId(n); 657 Parent:: getNotifier(Node()).erase(node);667 Parent::notifier(Node()).erase(node); 658 668 nodes.pop_back(); 659 669 } … … 1024 1034 while(s.edge_num<edges.size()) { 1025 1035 UEdge edge = uEdgeFromId(edges.size()1); 1026 Parent:: getNotifier(UEdge()).erase(edge);1036 Parent::notifier(UEdge()).erase(edge); 1027 1037 std::vector<Edge> dir; 1028 1038 dir.push_back(Parent::direct(edge, true)); 1029 1039 dir.push_back(Parent::direct(edge, false)); 1030 Parent:: getNotifier(Edge()).erase(dir);1040 Parent::notifier(Edge()).erase(dir); 1031 1041 aNodes[edges.back().aNode >> 1].first=edges.back().next_out; 1032 1042 bNodes[edges.back().bNode >> 1].first=edges.back().next_in; … … 1035 1045 while(s.anode_num<aNodes.size()) { 1036 1046 Node node = nodeFromANodeId(aNodes.size()  1); 1037 Parent:: getNotifier(ANode()).erase(node);1038 Parent:: getNotifier(Node()).erase(node);1047 Parent::notifier(ANode()).erase(node); 1048 Parent::notifier(Node()).erase(node); 1039 1049 aNodes.pop_back(); 1040 1050 } 1041 1051 while(s.bnode_num<bNodes.size()) { 1042 1052 Node node = nodeFromBNodeId(bNodes.size()  1); 1043 Parent:: getNotifier(BNode()).erase(node);1044 Parent:: getNotifier(Node()).erase(node);1053 Parent::notifier(BNode()).erase(node); 1054 Parent::notifier(Node()).erase(node); 1045 1055 bNodes.pop_back(); 1046 1056 }
Note: See TracChangeset
for help on using the changeset viewer.