lemon/edmonds_karp.h
changeset 1059 08f2dc76e82e
parent 1058 2f00ef323c2e
child 1060 45befc97b1bc
equal deleted inserted replaced
2:dbb3e19629cf 3:51512733a5ea
   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) {