lemon/cycle_canceling.h
changeset 2531 426a4e35e167
parent 2509 a8081c9cd96a
child 2533 aea952a1af99
equal deleted inserted replaced
2:dc65f131b6cd 3:b8daa2febbf5
   321       Supply sum = 0;
   321       Supply sum = 0;
   322       for (NodeIt n(graph); n != INVALID; ++n) sum += supply[n];
   322       for (NodeIt n(graph); n != INVALID; ++n) sum += supply[n];
   323       if (sum != 0) return false;
   323       if (sum != 0) return false;
   324 
   324 
   325       // Finding a feasible flow
   325       // Finding a feasible flow
   326       Circulation< Graph, Capacity, FlowMap, ConstMap<Edge, Capacity>,
   326       Circulation< Graph, Capacity, ConstMap<Edge, Capacity>,
   327 		   CapacityRefMap, SupplyMap >
   327 	CapacityRefMap, SupplyMap >::DefFlowMap<FlowMap>::Create
   328 	circulation( graph, constMap<Edge>((Capacity)0),
   328 	circulation( graph, constMap<Edge>((Capacity)0),
   329 		     capacity, supply, flow );
   329 		     capacity, supply);
   330       return circulation.run() == -1;
   330       circulation.flowMap(flowMap);
       
   331       return circulation.run();
   331     }
   332     }
   332 
   333 
   333 #ifdef LIMITED_CYCLE_CANCELING
   334 #ifdef LIMITED_CYCLE_CANCELING
   334     /// \brief Executes a cycle-canceling algorithm using
   335     /// \brief Executes a cycle-canceling algorithm using
   335     /// \ref lemon::BellmanFord "Bellman-Ford" algorithm with limited
   336     /// \ref lemon::BellmanFord "Bellman-Ford" algorithm with limited