src/work/marci_graph_demo.cc
changeset 182 c59e450712d8
parent 155 8c6292ec54c6
child 243 a85fd87460e3
equal deleted inserted replaced
9:0fba37e90468 10:e1511a48d30b
   234     max_flow_test.augmentOnBlockingFlow<ListGraph>();
   234     max_flow_test.augmentOnBlockingFlow<ListGraph>();
   235     for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
   235     for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
   236       std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
   236       std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
   237     }
   237     }
   238     std::cout<<std::endl;*/
   238     std::cout<<std::endl;*/
   239     max_flow_test.run();
   239     //max_flow_test.run();
   240     
   240     
   241     std::cout << "maximum flow: "<< std::endl;
   241     //std::cout << "maximum flow: "<< std::endl;
   242     for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
   242     while (max_flow_test.augmentOnShortestPath()) {
   243       std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
   243       for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) { 
   244     }
   244 	std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
   245     std::cout<<std::endl;
   245       }
       
   246       std::cout<<std::endl;
       
   247     }
   246     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
   248     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
   247   }
   249   }
   248 /*
   250 /*
   249   {
   251   {
   250     std::list<NodeIt> S;
   252     std::list<NodeIt> S;