[Lemon-commits] kpeter: r3411 - lemon/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Wed Dec 5 02:43:03 CET 2007


Author: kpeter
Date: Wed Dec  5 02:43:02 2007
New Revision: 3411

Modified:
   lemon/trunk/lemon/capacity_scaling.h
   lemon/trunk/lemon/circulation.h
   lemon/trunk/lemon/cycle_canceling.h
   lemon/trunk/lemon/min_cost_flow.h
   lemon/trunk/lemon/min_cost_max_flow.h
   lemon/trunk/lemon/network_simplex.h

Log:
Bug fixes.


Modified: lemon/trunk/lemon/capacity_scaling.h
==============================================================================
--- lemon/trunk/lemon/capacity_scaling.h	(original)
+++ lemon/trunk/lemon/capacity_scaling.h	Wed Dec  5 02:43:02 2007
@@ -66,12 +66,12 @@
   ///
   /// \author Peter Kovacs
 
-template < typename Graph,
-	   typename LowerMap = typename Graph::template EdgeMap<int>,
-	   typename CapacityMap = LowerMap,
-	   typename CostMap = typename Graph::template EdgeMap<int>,
-	   typename SupplyMap = typename Graph::template NodeMap
-				<typename CapacityMap::Value> >
+  template < typename Graph,
+	     typename LowerMap = typename Graph::template EdgeMap<int>,
+	     typename CapacityMap = LowerMap,
+	     typename CostMap = typename Graph::template EdgeMap<int>,
+	     typename SupplyMap = typename Graph::template NodeMap
+				  <typename CapacityMap::Value> >
   class CapacityScaling
   {
     typedef typename Graph::Node Node;
@@ -638,7 +638,7 @@
 	}
       }
 #ifdef _DEBUG_ITER_
-      std::cout << "Cost Scaling algorithm finished with running Dijkstra algorithm "
+      std::cout << "Capacity Scaling algorithm finished with running Dijkstra algorithm "
 	<< dijk_num << " times." << std::endl;
 #endif
 

Modified: lemon/trunk/lemon/circulation.h
==============================================================================
--- lemon/trunk/lemon/circulation.h	(original)
+++ lemon/trunk/lemon/circulation.h	Wed Dec  5 02:43:02 2007
@@ -373,9 +373,9 @@
       return tolerance;
     } 
     
-    /// \name Execution control The simplest way to execute the
-    /// algorithm is to use one of the member functions called \c
-    /// run().  
+    /// \name Execution control
+    /// The simplest way to execute the algorithm is to use one of the
+    /// member functions called \c run().
     /// \n 
     /// If you need more control on initial solution or execution then
     /// you have to call one \ref init() function and then the start()

Modified: lemon/trunk/lemon/cycle_canceling.h
==============================================================================
--- lemon/trunk/lemon/cycle_canceling.h	(original)
+++ lemon/trunk/lemon/cycle_canceling.h	Wed Dec  5 02:43:02 2007
@@ -86,12 +86,12 @@
   ///
   /// \author Peter Kovacs
 
-template < typename Graph,
-	   typename LowerMap = typename Graph::template EdgeMap<int>,
-	   typename CapacityMap = LowerMap,
-	   typename CostMap = typename Graph::template EdgeMap<int>,
-	   typename SupplyMap = typename Graph::template NodeMap
-				<typename CapacityMap::Value> >
+  template < typename Graph,
+             typename LowerMap = typename Graph::template EdgeMap<int>,
+             typename CapacityMap = LowerMap,
+             typename CostMap = typename Graph::template EdgeMap<int>,
+             typename SupplyMap = typename Graph::template NodeMap
+                                  <typename CapacityMap::Value> >
   class CycleCanceling
   {
     typedef typename Graph::Node Node;
@@ -323,12 +323,12 @@
       if (sum != 0) return false;
 
       // Finding a feasible flow
-      Circulation< Graph, Capacity, ConstMap<Edge, Capacity>,
-	CapacityRefMap, SupplyMap >::DefFlowMap<FlowMap>::Create
-	circulation( graph, constMap<Edge>((Capacity)0),
-		     capacity, supply);
-      circulation.flowMap(flowMap);
-      return circulation.run();
+      Circulation< Graph, ConstMap<Edge, Capacity>, CapacityRefMap,
+		   SupplyMap >
+	circulation( graph, constMap<Edge>((Capacity)0), capacity, 
+		     supply );
+      circulation.flowMap(flow);
+      return circulation.run() == -1;
     }
 
 #ifdef LIMITED_CYCLE_CANCELING

Modified: lemon/trunk/lemon/min_cost_flow.h
==============================================================================
--- lemon/trunk/lemon/min_cost_flow.h	(original)
+++ lemon/trunk/lemon/min_cost_flow.h	Wed Dec  5 02:43:02 2007
@@ -63,12 +63,12 @@
   ///
   /// \author Peter Kovacs
 
-template < typename Graph,
-	   typename LowerMap = typename Graph::template EdgeMap<int>,
-	   typename CapacityMap = LowerMap,
-	   typename CostMap = typename Graph::template EdgeMap<int>,
-	   typename SupplyMap = typename Graph::template NodeMap
-				<typename CapacityMap::Value> >
+  template < typename Graph,
+             typename LowerMap = typename Graph::template EdgeMap<int>,
+             typename CapacityMap = LowerMap,
+             typename CostMap = typename Graph::template EdgeMap<int>,
+             typename SupplyMap = typename Graph::template NodeMap
+                                  <typename CapacityMap::Value> >
   class MinCostFlow :
     public NetworkSimplex< Graph,
 			   LowerMap,

Modified: lemon/trunk/lemon/min_cost_max_flow.h
==============================================================================
--- lemon/trunk/lemon/min_cost_max_flow.h	(original)
+++ lemon/trunk/lemon/min_cost_max_flow.h	Wed Dec  5 02:43:02 2007
@@ -57,9 +57,9 @@
   ///
   /// \author Peter Kovacs
 
-template < typename Graph,
-	   typename CapacityMap = typename Graph::template EdgeMap<int>,
-	   typename CostMap = typename Graph::template EdgeMap<int> >
+  template < typename Graph,
+	     typename CapacityMap = typename Graph::template EdgeMap<int>,
+	     typename CostMap = typename Graph::template EdgeMap<int> >
   class MinCostMaxFlow
   {
     typedef typename Graph::Node Node;

Modified: lemon/trunk/lemon/network_simplex.h
==============================================================================
--- lemon/trunk/lemon/network_simplex.h	(original)
+++ lemon/trunk/lemon/network_simplex.h	Wed Dec  5 02:43:02 2007
@@ -93,12 +93,12 @@
   ///
   /// \author Peter Kovacs
 
-template < typename Graph,
-	   typename LowerMap = typename Graph::template EdgeMap<int>,
-	   typename CapacityMap = LowerMap,
-	   typename CostMap = typename Graph::template EdgeMap<int>,
-	   typename SupplyMap = typename Graph::template NodeMap
-				<typename CapacityMap::Value> >
+  template < typename Graph,
+             typename LowerMap = typename Graph::template EdgeMap<int>,
+             typename CapacityMap = LowerMap,
+             typename CostMap = typename Graph::template EdgeMap<int>,
+             typename SupplyMap = typename Graph::template NodeMap
+                                  <typename CapacityMap::Value> >
   class NetworkSimplex
   {
     typedef typename LowerMap::Value Lower;



More information about the Lemon-commits mailing list