Changeset 544:ccd2d3a3001e in lemon1.2 for test/gomory_hu_test.cc
 Timestamp:
 02/25/09 12:10:52 (11 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/gomory_hu_test.cc
r543 r544 3 3 #include "test_tools.h" 4 4 #include <lemon/smart_graph.h> 5 #include <lemon/adaptors.h>6 5 #include <lemon/lgf_reader.h> 7 #include <lemon/lgf_writer.h>8 #include <lemon/dimacs.h>9 #include <lemon/time_measure.h>10 6 #include <lemon/gomory_hu_tree.h> 11 7 #include <cstdlib> … … 78 74 check(cm[u] != cm[v], "Wrong cut 3"); 79 75 check(pf.flowValue() == cutValue(graph, cm, capacity), "Wrong cut 2"); 76 77 int sum=0; 78 for(GomoryHuTree<Graph>::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a) 79 sum+=capacity[a]; 80 check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt"); 81 82 sum=0; 83 for(GomoryHuTree<Graph>::MinCutNodeIt n(ght, u, v,true);n!=INVALID;++n) 84 sum++; 85 for(GomoryHuTree<Graph>::MinCutNodeIt n(ght, u, v,false);n!=INVALID;++n) 86 sum++; 87 check(sum == countNodes(graph), "Problem with MinCutNodeIt"); 80 88 81 89 }
Note: See TracChangeset
for help on using the changeset viewer.