src/work/marci_graph_demo.cc
changeset 140 ca164520d31a
parent 107 8d62f0072ff0
child 155 8c6292ec54c6
equal deleted inserted replaced
7:6c4d1f27bda5 8:73f13ad81ea5
   223 
   223 
   224 
   224 
   225   {
   225   {
   226     ListGraph::EdgeMap<int> flow(flowG, 0);
   226     ListGraph::EdgeMap<int> flow(flowG, 0);
   227     MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(flowG, s, t, flow, cap);
   227     MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(flowG, s, t, flow, cap);
       
   228     /*
       
   229     max_flow_test.augmentOnBlockingFlow<ListGraph>();
       
   230     for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
       
   231       std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
       
   232     }
       
   233     std::cout<<std::endl;
       
   234     max_flow_test.augmentOnBlockingFlow<ListGraph>();
       
   235     for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
       
   236       std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
       
   237     }
       
   238     std::cout<<std::endl;*/
   228     max_flow_test.run();
   239     max_flow_test.run();
   229     
   240     
   230     std::cout << "maximum flow: "<< std::endl;
   241     std::cout << "maximum flow: "<< std::endl;
   231     for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
   242     for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
   232       std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
   243       std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";