Changeset 986:e997802b855c in lemon-0.x for src/work/marci/max_flow_demo.cc
- Timestamp:
- 11/13/04 13:53:28 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/max_flow_demo.cc
r921 r986 48 48 49 49 for(Graph::EdgeIt e(g); e!=INVALID; ++e) { 50 if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])50 if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 51 51 std::cout << "Slackness does not hold!" << std::endl; 52 if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)52 if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 53 53 std::cout << "Slackness does not hold!" << std::endl; 54 54 } … … 64 64 65 65 for(Graph::EdgeIt e(g); e!=INVALID; ++e) { 66 if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])66 if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 67 67 std::cout << "Slackness does not hold!" << std::endl; 68 if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)68 if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 69 69 std::cout << "Slackness does not hold!" << std::endl; 70 70 } … … 91 91 92 92 for(Graph::EdgeIt e(g); e!=INVALID; ++e) { 93 if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])93 if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 94 94 std::cout << "Slackness does not hold!" << std::endl; 95 if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)95 if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 96 96 std::cout << "Slackness does not hold!" << std::endl; 97 97 } … … 109 109 110 110 for(Graph::EdgeIt e(g); e!=INVALID; ++e) { 111 if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])111 if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 112 112 std::cout << "Slackness does not hold!" << std::endl; 113 if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)113 if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 114 114 std::cout << "Slackness does not hold!" << std::endl; 115 115 } … … 127 127 128 128 for(Graph::EdgeIt e(g); e!=INVALID; ++e) { 129 if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])129 if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 130 130 std::cout << "Slackness does not hold!" << std::endl; 131 if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)131 if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 132 132 std::cout << "Slackness does not hold!" << std::endl; 133 133 } … … 145 145 146 146 for(Graph::EdgeIt e(g); e!=INVALID; ++e) { 147 if (cut[g. tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])147 if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 148 148 std::cout << "Slackness does not hold!" << std::endl; 149 if (!cut[g. tail(e)] && cut[g.head(e)] && flow[e]>0)149 if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 150 150 std::cout << "Slackness does not hold!" << std::endl; 151 151 }
Note: See TracChangeset
for help on using the changeset viewer.