src/work/marci/edmonds_karp_demo.cc
changeset 332 5dc61ba30730
parent 317 6e6db1c49bc1
child 333 e0a80761dfd9
equal deleted inserted replaced
22:b3762ad09704 23:c25d3f91f2db
   102 
   102 
   103     Timer ts;
   103     Timer ts;
   104     ts.reset();
   104     ts.reset();
   105 
   105 
   106     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   106     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   107       max_flow_test(G, s, t, flow, cap);
   107       max_flow_test(G, s, t, cap, flow);
   108     int i=0;
   108     int i=0;
   109     while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { 
   109     while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { 
   110 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   110 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   111 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   111 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   112 //     }
   112 //     }
   130 
   130 
   131     Timer ts;
   131     Timer ts;
   132     ts.reset();
   132     ts.reset();
   133 
   133 
   134     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   134     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   135       max_flow_test(G, s, t, flow, cap);
   135       max_flow_test(G, s, t, cap, flow);
   136     int i=0;
   136     int i=0;
   137     while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) { 
   137     while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) { 
   138 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   138 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   139 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   139 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   140 //     }
   140 //     }
   158 
   158 
   159     Timer ts;
   159     Timer ts;
   160     ts.reset();
   160     ts.reset();
   161 
   161 
   162     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   162     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   163       max_flow_test(G, s, t, flow, cap);
   163       max_flow_test(G, s, t, cap, flow);
   164     int i=0;
   164     int i=0;
   165     while (max_flow_test.augmentOnBlockingFlow2()) { 
   165     while (max_flow_test.augmentOnBlockingFlow2()) { 
   166 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   166 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   167 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   167 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   168 //     }
   168 //     }
   186 
   186 
   187     Timer ts;
   187     Timer ts;
   188     ts.reset();
   188     ts.reset();
   189 
   189 
   190     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   190     MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
   191       max_flow_test(G, s, t, flow, cap);
   191       max_flow_test(G, s, t, cap, flow);
   192     int i=0;
   192     int i=0;
   193     while (max_flow_test.augmentOnShortestPath()) { 
   193     while (max_flow_test.augmentOnShortestPath()) { 
   194 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   194 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
   195 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   195 //       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
   196 //     }
   196 //     }