Changeset 577:e8703f0a6e2f in lemon0.x for src/work/marci/max_flow_demo.cc
 Timestamp:
 05/07/04 13:57:34 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@753
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/max_flow_demo.cc
r555 r577 64 64 65 65 66 Graph G;66 Graph g; 67 67 Node s, t; 68 Graph::EdgeMap<int> cap(G); 69 readDimacsMaxFlow(std::cin, G, s, t, cap); 68 Graph::EdgeMap<int> cap(g); 69 //readDimacsMaxFlow(std::cin, g, s, t, cap); 70 readDimacs(std::cin, g, cap, s, t); 70 71 Timer ts; 71 Graph::EdgeMap<int> flow( G); //0 flow72 Graph::EdgeMap<int> flow(g); //0 flow 72 73 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 73 max_flow_test( G, s, t, cap, flow);74 max_flow_test(g, s, t, cap, flow); 74 75 75 76 { … … 83 84 { 84 85 std::cout << "preflow ..." << std::endl; 85 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);86 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 86 87 ts.reset(); 87 88 max_flow_test.preflow(MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::GEN_FLOW); … … 92 93 // { 93 94 // std::cout << "wrapped preflow ..." << std::endl; 94 // FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);95 // FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 95 96 // ts.reset(); 96 97 // pre_flow_res.run(); … … 101 102 { 102 103 std::cout << "physical blocking flow augmentation ..." << std::endl; 103 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);104 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 104 105 ts.reset(); 105 106 int i=0; … … 112 113 // { 113 114 // std::cout << "faster physical blocking flow augmentation ..." << std::endl; 114 // FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);115 // FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 115 116 // ts.reset(); 116 117 // int i=0; … … 123 124 { 124 125 std::cout << "onthefly blocking flow augmentation ..." << std::endl; 125 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);126 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 126 127 ts.reset(); 127 128 int i=0; … … 134 135 { 135 136 std::cout << "onthefly shortest path augmentation ..." << std::endl; 136 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);137 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 137 138 ts.reset(); 138 139 int i=0;
Note: See TracChangeset
for help on using the changeset viewer.