# HG changeset patch # User deba # Date 1144147202 0 # Node ID 9d0c8a205e58731c1a7bcf641f40a1691dff11ba # Parent e92071fadd3ffa26896a0483a1b198a450f846be The algorithm does not change the capacity and the flow in the resgraph diff -r e92071fadd3f -r 9d0c8a205e58 lemon/edmonds_karp.h --- a/lemon/edmonds_karp.h Mon Apr 03 19:47:37 2006 +0000 +++ b/lemon/edmonds_karp.h Tue Apr 04 10:40:02 2006 +0000 @@ -39,9 +39,7 @@ /// feasible flow solutions. The \e source node, the \e target node, the \e /// capacity of the edges and the \e starting \e flow value of the /// edges should be passed to the algorithm through the - /// constructor. It is possible to change these quantities using the - /// functions \ref source, \ref target, \ref capacityMap and \ref - /// flowMap. + /// constructor. /// /// The time complexity of the algorithm is O(n * e^2) in worst case. /// Always try the preflow algorithm instead of this if you does not @@ -310,13 +308,6 @@ bfs.run(_target); } - /// \brief Sets the source node to \c _source. - /// - /// Sets the source node to \c _source. - void source(Node source) { - _source = source; - } - /// \brief Returns the source node. /// /// Returns the source node. @@ -325,13 +316,6 @@ return _source; } - /// \brief Sets the target node to \c target. - /// - /// Sets the target node to \c target. - void target(Node target) { - _target = target; - } - /// \brief Returns the target node. /// /// Returns the target node. @@ -340,14 +324,6 @@ return _target; } - /// \brief Sets the edge map of the capacities to _cap. - /// - /// Sets the edge map of the capacities to _cap. - /// - void capacityMap(const CapacityMap& capacity) { - _capacity = &capacity; - } - /// \brief Returns a reference to capacity map. /// /// Returns a reference to capacity map. @@ -355,14 +331,6 @@ const CapacityMap &capacityMap() const { return *_capacity; } - - /// \brief Sets the edge map of the flows to \c flow. - /// - /// Sets the edge map of the flows to \c flow. - /// - void flowMap(FlowMap& flow) { - _flow = &flow; - } /// \brief Returns a reference to flow map. /// @@ -372,6 +340,13 @@ return *_flow; } + /// \brief Returns the tolerance used by algorithm. + /// + /// Returns the tolerance used by algorithm. + const Tolerance& tolerance() const { + return tolerance; + } + private: const Graph& _graph;