The algorithm does not change the capacity and the flow in the resgraph
authordeba
Tue, 04 Apr 2006 10:40:02 +0000
changeset 20369d0c8a205e58
parent 2035 e92071fadd3f
child 2037 32e4bebee616
The algorithm does not change the capacity and the flow in the resgraph
lemon/edmonds_karp.h
     1.1 --- a/lemon/edmonds_karp.h	Mon Apr 03 19:47:37 2006 +0000
     1.2 +++ b/lemon/edmonds_karp.h	Tue Apr 04 10:40:02 2006 +0000
     1.3 @@ -39,9 +39,7 @@
     1.4    /// feasible flow solutions. The \e source node, the \e target node, the \e
     1.5    /// capacity of the edges and the \e starting \e flow value of the
     1.6    /// edges should be passed to the algorithm through the
     1.7 -  /// constructor. It is possible to change these quantities using the
     1.8 -  /// functions \ref source, \ref target, \ref capacityMap and \ref
     1.9 -  /// flowMap.
    1.10 +  /// constructor.
    1.11    ///
    1.12    /// The time complexity of the algorithm is O(n * e^2) in worst case. 
    1.13    /// Always try the preflow algorithm instead of this if you does not
    1.14 @@ -310,13 +308,6 @@
    1.15        bfs.run(_target);
    1.16      }
    1.17  
    1.18 -    /// \brief Sets the source node to \c _source.
    1.19 -    ///
    1.20 -    /// Sets the source node to \c _source.
    1.21 -    void source(Node source) { 
    1.22 -      _source = source; 
    1.23 -    }
    1.24 -
    1.25      /// \brief Returns the source node.
    1.26      ///
    1.27      /// Returns the source node.
    1.28 @@ -325,13 +316,6 @@
    1.29        return _source;
    1.30      }
    1.31  
    1.32 -    /// \brief Sets the target node to \c target.
    1.33 -    ///
    1.34 -    /// Sets the target node to \c target.
    1.35 -    void target(Node target) { 
    1.36 -      _target = target; 
    1.37 -    }
    1.38 -
    1.39      /// \brief Returns the target node.
    1.40      ///
    1.41      /// Returns the target node.
    1.42 @@ -340,14 +324,6 @@
    1.43        return _target;
    1.44      }
    1.45  
    1.46 -    /// \brief Sets the edge map of the capacities to _cap.
    1.47 -    ///
    1.48 -    /// Sets the edge map of the capacities to _cap.
    1.49 -    /// 
    1.50 -    void capacityMap(const CapacityMap& capacity) { 
    1.51 -      _capacity = &capacity; 
    1.52 -    }
    1.53 -
    1.54      /// \brief Returns a reference to capacity map.
    1.55      ///
    1.56      /// Returns a reference to capacity map.
    1.57 @@ -355,14 +331,6 @@
    1.58      const CapacityMap &capacityMap() const { 
    1.59        return *_capacity;
    1.60      }
    1.61 -
    1.62 -    /// \brief Sets the edge map of the flows to \c flow.
    1.63 -    ///
    1.64 -    /// Sets the edge map of the flows to \c flow.
    1.65 -    /// 
    1.66 -    void flowMap(FlowMap& flow) { 
    1.67 -      _flow = &flow; 
    1.68 -    }
    1.69       
    1.70      /// \brief Returns a reference to flow map.
    1.71      ///
    1.72 @@ -372,6 +340,13 @@
    1.73        return *_flow;
    1.74      }
    1.75  
    1.76 +    /// \brief Returns the tolerance used by algorithm.
    1.77 +    ///
    1.78 +    /// Returns the tolerance used by algorithm.
    1.79 +    const Tolerance& tolerance() const {
    1.80 +      return tolerance;
    1.81 +    } 
    1.82 +    
    1.83    private:
    1.84      
    1.85      const Graph& _graph;