diff -r f4c32484dc5b -r a4bb28813570 src/test/preflow_test.cc --- a/src/test/preflow_test.cc Mon Sep 13 17:14:47 2004 +0000 +++ b/src/test/preflow_test.cc Mon Sep 13 17:20:03 2004 +0000 @@ -57,6 +57,7 @@ typedef SmartGraph Graph; + typedef Graph::Node Node; typedef Graph::NodeIt NodeIt; typedef Graph::EdgeIt EdgeIt; typedef Graph::EdgeMap CapMap; @@ -68,7 +69,7 @@ std::ifstream file("preflow_graph"); Graph G; - NodeIt s, t; + Node s, t; CapMap cap(G); readDimacs(file, G, cap, s, t); @@ -100,7 +101,12 @@ for(EdgeIt e(G); e!=INVALID; ++e) cap[e]=2*cap[e]; preflow_test.setCap(cap); - preflow_test.setTarget(++t); //the max flow value remains 2*flow_value + + NodeIt tmp_node(G,t); + ++tmp_node; + t=tmp_node; + + preflow_test.setTarget(t); //the max flow value remains 2*flow_value //warning: ++t must be a valid node. In preflow_graph, it is. preflow_test.phase1(PType::PRE_FLOW);