[Lemon-commits] [lemon_svn] deba: r2675 - hugo/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:54:23 CET 2006


Author: deba
Date: Tue Apr  4 12:40:02 2006
New Revision: 2675

Modified:
   hugo/trunk/lemon/edmonds_karp.h

Log:
The algorithm does not change the capacity and the flow in the resgraph




Modified: hugo/trunk/lemon/edmonds_karp.h
==============================================================================
--- hugo/trunk/lemon/edmonds_karp.h	(original)
+++ hugo/trunk/lemon/edmonds_karp.h	Tue Apr  4 12:40:02 2006
@@ -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;



More information about the Lemon-commits mailing list