src/work/marci/lp/max_flow_by_lp.cc
changeset 986 e997802b855c
parent 921 818510fa3d99
child 1014 aae850a2394d
     1.1 --- a/src/work/marci/lp/max_flow_by_lp.cc	Sat Nov 13 12:24:01 2004 +0000
     1.2 +++ b/src/work/marci/lp/max_flow_by_lp.cc	Sat Nov 13 12:53:28 2004 +0000
     1.3 @@ -63,9 +63,9 @@
     1.4      max_flow_test.actMinCut(cut);
     1.5  
     1.6      FOR_EACH_LOC(Graph::EdgeIt, e, g) {
     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 @@ -79,9 +79,9 @@
    1.16  //     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
    1.17  
    1.18  //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    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 @@ -106,9 +106,9 @@
    1.28      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    1.29  
    1.30      FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    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 @@ -135,9 +135,9 @@
    1.40      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    1.41  
    1.42      FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    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 @@ -153,9 +153,9 @@
    1.52  //     std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    1.53  
    1.54  //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    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 @@ -171,9 +171,9 @@
    1.64  //     std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    1.65  
    1.66  //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    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  //   }