src/work/edmonds_karp.h
changeset 179 91646df36ffc
parent 174 44700ed9ffaa
child 191 efea403c9595
equal deleted inserted replaced
0:778240c51bcf 1:c282b5dd44ab
   462       //std::cout << "meg jo1" << std::endl;
   462       //std::cout << "meg jo1" << std::endl;
   463 
   463 
   464       //typedef typename EAugGraph::NodeMap<bool> ReachedMap;
   464       //typedef typename EAugGraph::NodeMap<bool> ReachedMap;
   465       BfsIterator4< 
   465       BfsIterator4< 
   466 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>, 
   466 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>, 
   467 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt, 
   467 	typename ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt, 
   468 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::NodeMap<bool> > bfs(res_graph);
   468 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::NodeMap<bool> > bfs(res_graph);
   469       
   469       
   470       //std::cout << "meg jo2" << std::endl;
   470       //std::cout << "meg jo2" << std::endl;
   471 
   471 
   472       bfs.pushAndSetReached(s);
   472       bfs.pushAndSetReached(s);
   476       typename ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::
   476       typename ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::
   477 	NodeMap<int>& dist=res_graph.dist;
   477 	NodeMap<int>& dist=res_graph.dist;
   478       //std::cout << "meg jo2.6" << std::endl;
   478       //std::cout << "meg jo2.6" << std::endl;
   479 
   479 
   480       while ( !bfs.finished() ) {
   480       while ( !bfs.finished() ) {
   481 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt e=bfs;
   481 	typename ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt e=bfs;
   482 //	EAugOutEdgeIt e=/*AugOutEdgeIt*/(bfs);
   482 //	EAugOutEdgeIt e=/*AugOutEdgeIt*/(bfs);
   483  	//if (res_graph.valid(e)) {
   483  	//if (res_graph.valid(e)) {
   484  	//    std::cout<<"a:"<<res_graph.tail(e)<<"b:"<<res_graph.head(e)<<std::endl;
   484  	//    std::cout<<"a:"<<res_graph.tail(e)<<"b:"<<res_graph.head(e)<<std::endl;
   485  	//}
   485  	//}
   486 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
   486 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {