Changeset 2526:b7727edd44f2 in lemon-0.x for demo/circulation_demo.cc
- Timestamp:
- 11/28/07 18:51:02 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3402
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/circulation_demo.cc
r2391 r2526 53 53 EdgeMap lo(g); 54 54 EdgeMap up(g); 55 EdgeMap x(g);56 55 NodeMap delta(g); 57 56 NodeMap nid(g); … … 70 69 run(); 71 70 72 Circulation<Graph ,int> gen(g,lo,up,delta,x);73 intret=gen.run();74 if(ret ==-1)71 Circulation<Graph> gen(g,lo,up,delta); 72 bool ret=gen.run(); 73 if(ret) 75 74 { 76 75 std::cout << "\nA feasible flow has been found.\n"; 77 if(!gen.check X(x)) std::cerr << "Oops!!!\n";76 if(!gen.checkFlow()) std::cerr << "Oops!!!\n"; 78 77 GraphWriter<Graph>("circulation-output.lgf", g). 79 78 writeEdgeMap("lo_cap", lo). 80 79 writeEdgeMap("up_cap", up). 81 writeEdgeMap("flow", x).80 writeEdgeMap("flow", gen.flowMap()). 82 81 writeNodeMap("delta", delta). 83 82 writeEdgeMap("label", eid). … … 90 89 std::cout << "\nThere is no such a flow\n"; 91 90 Graph::NodeMap<int> bar(g); 92 gen.barrier (bar,ret);93 if(!gen.checkBarrier( bar)) std::cerr << "Dual Oops!!!\n";91 gen.barrierMap(bar); 92 if(!gen.checkBarrier()) std::cerr << "Dual Oops!!!\n"; 94 93 95 94 GraphWriter<Graph>("circulation-output.lgf", g).
Note: See TracChangeset
for help on using the changeset viewer.