equal
deleted
inserted
replaced
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, ConstMap<Edge, Capacity>, CapacityRefMap, |
326 Circulation< Graph, ConstMap<Edge, Capacity>, CapacityRefMap, |
327 SupplyMap > |
327 SupplyMap > |
328 circulation( graph, constMap<Edge>((Capacity)0), capacity, |
328 circulation( graph, constMap<Edge>((Capacity)0), capacity, |
329 supply ); |
329 supply ); |
330 circulation.flowMap(flow); |
330 circulation.flowMap(flow); |
331 return circulation.run() == -1; |
331 return circulation.run(); |
332 } |
332 } |
333 |
333 |
334 #ifdef LIMITED_CYCLE_CANCELING |
334 #ifdef LIMITED_CYCLE_CANCELING |
335 /// \brief Executes a cycle-canceling algorithm using |
335 /// \brief Executes a cycle-canceling algorithm using |
336 /// \ref lemon::BellmanFord "Bellman-Ford" algorithm with limited |
336 /// \ref lemon::BellmanFord "Bellman-Ford" algorithm with limited |