1.1 --- a/test/gomory_hu_test.cc Fri Feb 20 17:17:17 2009 +0100
1.2 +++ b/test/gomory_hu_test.cc Wed Feb 25 11:10:52 2009 +0000
1.3 @@ -2,11 +2,7 @@
1.4
1.5 #include "test_tools.h"
1.6 #include <lemon/smart_graph.h>
1.7 -#include <lemon/adaptors.h>
1.8 #include <lemon/lgf_reader.h>
1.9 -#include <lemon/lgf_writer.h>
1.10 -#include <lemon/dimacs.h>
1.11 -#include <lemon/time_measure.h>
1.12 #include <lemon/gomory_hu_tree.h>
1.13 #include <cstdlib>
1.14
1.15 @@ -77,6 +73,18 @@
1.16 check(pf.flowValue() == ght.minCutValue(u, v), "Wrong cut 1");
1.17 check(cm[u] != cm[v], "Wrong cut 3");
1.18 check(pf.flowValue() == cutValue(graph, cm, capacity), "Wrong cut 2");
1.19 +
1.20 + int sum=0;
1.21 + for(GomoryHuTree<Graph>::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a)
1.22 + sum+=capacity[a];
1.23 + check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt");
1.24 +
1.25 + sum=0;
1.26 + for(GomoryHuTree<Graph>::MinCutNodeIt n(ght, u, v,true);n!=INVALID;++n)
1.27 + sum++;
1.28 + for(GomoryHuTree<Graph>::MinCutNodeIt n(ght, u, v,false);n!=INVALID;++n)
1.29 + sum++;
1.30 + check(sum == countNodes(graph), "Problem with MinCutNodeIt");
1.31
1.32 }
1.33 }