Changeset 2463:19651a04d056 in lemon-0.x for test/bipartite_matching_test.cc
- Timestamp:
- 08/21/07 15:22:21 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3301
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/bipartite_matching_test.cc
r2462 r2463 137 137 138 138 { 139 Graph:: UEdgeMap<bool> mm(graph);139 Graph::ANodeMap<UEdge> mm(graph); 140 140 141 141 check(max_cardinality == maxBipartiteMatching(graph, mm), 142 142 "WRONG MATCHING"); 143 143 144 for (ANodeIt it(graph); it != INVALID; ++it) { 145 int num = 0; 146 for (IncEdgeIt jt(graph, it); jt != INVALID; ++jt) { 147 if (mm[jt]) ++num; 144 for (BNodeIt it(graph); it != INVALID; ++it) { 145 int num = 0; 146 147 for (IncEdgeIt jt(graph, it); jt != INVALID; ++jt) { 148 if (mm[graph.aNode(jt)] == jt) ++num; 149 } 150 check(num <= 1, "INVALID PRIMAL"); 151 } 152 } 153 154 { 155 Graph::ANodeMap<UEdge> mm(graph); 156 157 check(max_cardinality == prBipartiteMatching(graph, mm), 158 "WRONG MATCHING"); 159 160 for (BNodeIt it(graph); it != INVALID; ++it) { 161 int num = 0; 162 163 for (IncEdgeIt jt(graph, it); jt != INVALID; ++jt) { 164 if (mm[graph.aNode(jt)] == jt) ++num; 148 165 } 149 166 check(num <= 1, "INVALID PRIMAL");
Note: See TracChangeset
for help on using the changeset viewer.