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

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/lg_vs_sg.cc
r555 r577 26 26 typedef Graph::EdgeIt EdgeIt; 27 27 28 Graph G;28 Graph g; 29 29 Node s, t; 30 Graph::EdgeMap<int> cap( G);30 Graph::EdgeMap<int> cap(g); 31 31 std::ifstream ins(in.c_str()); 32 readDimacsMaxFlow(ins, G, s, t, cap); 32 //readDimacsMaxFlow(ins, g, s, t, cap); 33 readDimacs(ins, g, cap, s, t); 33 34 34 35 Timer ts; 35 Graph::EdgeMap<int> flow( G); //0 flow36 Graph::EdgeMap<int> flow(g); //0 flow 36 37 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 37 max_flow_test( G, s, t, cap, flow/*, true*/);38 max_flow_test(g, s, t, cap, flow/*, true*/); 38 39 39 40 std::cout << "ListGraph ..." << std::endl; … … 49 50 { 50 51 std::cout << "physical blocking flow augmentation ..." << std::endl; 51 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);52 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 52 53 ts.reset(); 53 54 int i=0; … … 60 61 // { 61 62 // std::cout << "faster physical blocking flow augmentation ..." << std::endl; 62 // FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);63 // FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 63 64 // ts.reset(); 64 65 // int i=0; … … 71 72 { 72 73 std::cout << "onthefly blocking flow augmentation ..." << std::endl; 73 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);74 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 74 75 ts.reset(); 75 76 int i=0; … … 82 83 { 83 84 std::cout << "onthefly shortest path augmentation ..." << std::endl; 84 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);85 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 85 86 ts.reset(); 86 87 int i=0; … … 98 99 typedef Graph::EdgeIt EdgeIt; 99 100 100 Graph G;101 Graph g; 101 102 Node s, t; 102 Graph::EdgeMap<int> cap( G);103 Graph::EdgeMap<int> cap(g); 103 104 std::ifstream ins(in.c_str()); 104 readDimacsMaxFlow(ins, G, s, t, cap); 105 //readDimacsMaxFlow(ins, g, s, t, cap); 106 readDimacs(ins, g, cap, s, t); 105 107 106 108 Timer ts; 107 Graph::EdgeMap<int> flow( G); //0 flow109 Graph::EdgeMap<int> flow(g); //0 flow 108 110 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 109 max_flow_test( G, s, t, cap, flow/*, true*/);111 max_flow_test(g, s, t, cap, flow/*, true*/); 110 112 // MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 111 // max_flow_test( G, s, t, cap, flow);113 // max_flow_test(g, s, t, cap, flow); 112 114 113 115 std::cout << "SmatrGraph ..." << std::endl; … … 115 117 { 116 118 std::cout << "preflow ..." << std::endl; 117 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);119 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 118 120 ts.reset(); 119 121 max_flow_test.run(); … … 124 126 { 125 127 std::cout << "physical blocking flow augmentation ..." << std::endl; 126 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);128 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 127 129 ts.reset(); 128 130 int i=0; … … 135 137 // { 136 138 // std::cout << "faster physical blocking flow augmentation ..." << std::endl; 137 // FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);139 // FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 138 140 // ts.reset(); 139 141 // int i=0; … … 146 148 { 147 149 std::cout << "onthefly blocking flow augmentation ..." << std::endl; 148 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);150 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 149 151 ts.reset(); 150 152 int i=0; … … 157 159 { 158 160 std::cout << "onthefly shortest path augmentation ..." << std::endl; 159 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);161 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 160 162 ts.reset(); 161 163 int i=0;
Note: See TracChangeset
for help on using the changeset viewer.