1.1 --- a/src/work/marci/max_flow_demo.cc Sat Nov 13 12:24:01 2004 +0000
1.2 +++ b/src/work/marci/max_flow_demo.cc Sat Nov 13 12:53:28 2004 +0000
1.3 @@ -47,9 +47,9 @@
1.4 max_flow_test.minCut(cut);
1.5
1.6 for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
1.7 - if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
1.8 + if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
1.9 std::cout << "Slackness does not hold!" << std::endl;
1.10 - if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
1.11 + if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
1.12 std::cout << "Slackness does not hold!" << std::endl;
1.13 }
1.14 }
1.15 @@ -63,9 +63,9 @@
1.16 std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
1.17
1.18 for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
1.19 - if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
1.20 + if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
1.21 std::cout << "Slackness does not hold!" << std::endl;
1.22 - if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
1.23 + if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
1.24 std::cout << "Slackness does not hold!" << std::endl;
1.25 }
1.26 }
1.27 @@ -90,9 +90,9 @@
1.28 std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
1.29
1.30 for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
1.31 - if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
1.32 + if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
1.33 std::cout << "Slackness does not hold!" << std::endl;
1.34 - if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
1.35 + if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
1.36 std::cout << "Slackness does not hold!" << std::endl;
1.37 }
1.38 }
1.39 @@ -108,9 +108,9 @@
1.40 std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
1.41
1.42 for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
1.43 - if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
1.44 + if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
1.45 std::cout << "Slackness does not hold!" << std::endl;
1.46 - if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
1.47 + if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
1.48 std::cout << "Slackness does not hold!" << std::endl;
1.49 }
1.50 }
1.51 @@ -126,9 +126,9 @@
1.52 std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
1.53
1.54 for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
1.55 - if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
1.56 + if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
1.57 std::cout << "Slackness does not hold!" << std::endl;
1.58 - if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
1.59 + if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
1.60 std::cout << "Slackness does not hold!" << std::endl;
1.61 }
1.62 }
1.63 @@ -144,9 +144,9 @@
1.64 std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
1.65
1.66 for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
1.67 - if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
1.68 + if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
1.69 std::cout << "Slackness does not hold!" << std::endl;
1.70 - if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
1.71 + if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
1.72 std::cout << "Slackness does not hold!" << std::endl;
1.73 }
1.74 }