Changeset 986:e997802b855c in lemon0.x for src/work/marci/preflow_bug.cc
 Timestamp:
 11/13/04 13:53:28 (16 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1376
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/preflow_bug.cc
r921 r986 46 46 Graph::EdgeIt e; 47 47 for (g.first(e); g.valid(e); g.next(e)) 48 cout << 1+g.id(g. tail(e)) << ">" << 1+g.id(g.head(e)) << " cap: " << cap[e] << " preflow: " << flow[e] << endl;48 cout << 1+g.id(g.source(e)) << ">" << 1+g.id(g.target(e)) << " cap: " << cap[e] << " preflow: " << flow[e] << endl; 49 49 } 50 50 { … … 76 76 Graph::EdgeIt e; 77 77 for (g.first(e); g.valid(e); g.next(e)) { 78 if (cut[g. tail(e)] && !cut[g.head(e)]) {79 cout << 1+g.id(g. tail(e)) << ">" << 1+g.id(g.head(e))78 if (cut[g.source(e)] && !cut[g.target(e)]) { 79 cout << 1+g.id(g.source(e)) << ">" << 1+g.id(g.target(e)) 80 80 << "(forward edge) flow: " << flow[e] 81 81 << " cap: " << cap[e]<< endl; … … 83 83 std::cout << "Slackness does not hold!" << std::endl; 84 84 } 85 if (!cut[g. tail(e)] && cut[g.head(e)]) {86 cout << 1+g.id(g. tail(e)) << ">" << 1+g.id(g.head(e))85 if (!cut[g.source(e)] && cut[g.target(e)]) { 86 cout << 1+g.id(g.source(e)) << ">" << 1+g.id(g.target(e)) 87 87 << "(backward edge) flow: " << flow[e] << endl; 88 88 if (flow[e]!=0) … … 106 106 107 107 // FOR_EACH_LOC(Graph::EdgeIt, e, g) { 108 // if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])109 // std::cout << "Slackness does not hold!" << std::endl; 110 // if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)108 // if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 109 // std::cout << "Slackness does not hold!" << std::endl; 110 // if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 111 111 // std::cout << "Slackness does not hold!" << std::endl; 112 112 // } … … 122 122 123 123 // FOR_EACH_LOC(Graph::EdgeIt, e, g) { 124 // if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])125 // std::cout << "Slackness does not hold!" << std::endl; 126 // if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)124 // if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 125 // std::cout << "Slackness does not hold!" << std::endl; 126 // if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 127 127 // std::cout << "Slackness does not hold!" << std::endl; 128 128 // } … … 149 149 150 150 // FOR_EACH_LOC(Graph::EdgeIt, e, g) { 151 // if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])152 // std::cout << "Slackness does not hold!" << std::endl; 153 // if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)151 // if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 152 // std::cout << "Slackness does not hold!" << std::endl; 153 // if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 154 154 // std::cout << "Slackness does not hold!" << std::endl; 155 155 // } … … 178 178 179 179 // FOR_EACH_LOC(Graph::EdgeIt, e, g) { 180 // if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])181 // std::cout << "Slackness does not hold!" << std::endl; 182 // if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)180 // if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 181 // std::cout << "Slackness does not hold!" << std::endl; 182 // if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 183 183 // std::cout << "Slackness does not hold!" << std::endl; 184 184 // } … … 196 196 197 197 // FOR_EACH_LOC(Graph::EdgeIt, e, g) { 198 // if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])199 // std::cout << "Slackness does not hold!" << std::endl; 200 // if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)198 // if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 199 // std::cout << "Slackness does not hold!" << std::endl; 200 // if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 201 201 // std::cout << "Slackness does not hold!" << std::endl; 202 202 // } … … 214 214 215 215 // FOR_EACH_LOC(Graph::EdgeIt, e, g) { 216 // if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])217 // std::cout << "Slackness does not hold!" << std::endl; 218 // if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)216 // if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 217 // std::cout << "Slackness does not hold!" << std::endl; 218 // if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 219 219 // std::cout << "Slackness does not hold!" << std::endl; 220 220 // }
Note: See TracChangeset
for help on using the changeset viewer.