equal
deleted
inserted
replaced
309 /// flow to the given \c flowMap. The \c flowMap should |
309 /// flow to the given \c flowMap. The \c flowMap should |
310 /// contain a feasible flow, i.e. at each node excluding the source |
310 /// contain a feasible flow, i.e. at each node excluding the source |
311 /// and the target, the incoming flow should be equal to the |
311 /// and the target, the incoming flow should be equal to the |
312 /// outgoing flow. |
312 /// outgoing flow. |
313 template <typename FlowMap> |
313 template <typename FlowMap> |
314 void flowInit(const FlowMap& flowMap) { |
314 void init(const FlowMap& flowMap) { |
315 createStructures(); |
315 createStructures(); |
316 for (ArcIt e(_graph); e != INVALID; ++e) { |
316 for (ArcIt e(_graph); e != INVALID; ++e) { |
317 _flow->set(e, flowMap[e]); |
317 _flow->set(e, flowMap[e]); |
318 } |
318 } |
319 _flow_value = 0; |
319 _flow_value = 0; |
333 /// and the target, the incoming flow should be equal to the |
333 /// and the target, the incoming flow should be equal to the |
334 /// outgoing flow. |
334 /// outgoing flow. |
335 /// \return \c false when the given \c flowMap does not contain a |
335 /// \return \c false when the given \c flowMap does not contain a |
336 /// feasible flow. |
336 /// feasible flow. |
337 template <typename FlowMap> |
337 template <typename FlowMap> |
338 bool checkedFlowInit(const FlowMap& flowMap) { |
338 bool checkedInit(const FlowMap& flowMap) { |
339 createStructures(); |
339 createStructures(); |
340 for (ArcIt e(_graph); e != INVALID; ++e) { |
340 for (ArcIt e(_graph); e != INVALID; ++e) { |
341 _flow->set(e, flowMap[e]); |
341 _flow->set(e, flowMap[e]); |
342 } |
342 } |
343 for (NodeIt it(_graph); it != INVALID; ++it) { |
343 for (NodeIt it(_graph); it != INVALID; ++it) { |