Changeset 2205:c20b0eb92a33 in lemon-0.x for lemon/max_matching.h
- Timestamp:
- 09/06/06 13:17:12 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2930
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/max_matching.h
r2042 r2205 66 66 typedef typename Graph::IncEdgeIt IncEdgeIt; 67 67 68 typedef UnionFindEnum<Node, Graph::template NodeMap> UFE; 68 typedef typename Graph::template NodeMap<int> UFECrossRef; 69 typedef UnionFindEnum<Node, UFECrossRef> UFE; 69 70 70 71 public: … … 122 123 //representative elements of UFE blossom) and for the nodes in C 123 124 124 typename UFE::MapTypeblossom_base(g);125 UFECrossRef blossom_base(g); 125 126 UFE blossom(blossom_base); 126 typename UFE::MapType tree_base(g); 127 128 UFECrossRef tree_base(g); 127 129 UFE tree(tree_base); 130 128 131 //If these UFE's would be members of the class then also 129 132 //blossom_base and tree_base should be a member. … … 550 553 } 551 554 Node y=blossom.find(x); 552 typename UFE::ItemIt it; 553 for (tree.first(it,blossom.find(x)); tree.valid(it); tree.next(it)) { 554 if ( position[it] == D ) { 555 typename UFE::ItemIt b_it; 556 for (blossom.first(b_it,it); blossom.valid(b_it); blossom.next(b_it)) { 557 position.set( b_it ,C); 555 for (typename UFE::ItemIt tit(tree, y); tit != INVALID; ++tit) { 556 if ( position[tit] == D ) { 557 for (typename UFE::ItemIt bit(blossom, tit); bit != INVALID; ++bit) { 558 position.set( bit ,C); 558 559 } 559 blossom.eraseClass( it);560 } else position.set( it ,C);560 blossom.eraseClass(tit); 561 } else position.set( tit ,C); 561 562 } 562 563 tree.eraseClass(y);
Note: See TracChangeset
for help on using the changeset viewer.