[Lemon-commits] deba: r3381 - lemon/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Sat Nov 17 22:41:02 CET 2007


Author: deba
Date: Sat Nov 17 22:41:01 2007
New Revision: 3381

Modified:
   lemon/trunk/lemon/min_cost_max_flow.h

Log:
Changing max flow interface



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	Sat Nov 17 22:41:01 2007
@@ -92,7 +92,7 @@
     /// \brief The edge map of the found flow.
     FlowMap flow;
 
-    typedef Preflow<Graph, Capacity, CapacityMap, FlowMap> PreflowImpl;
+    typedef Preflow<Graph, CapacityMap> PreflowImpl;
     /// \brief \ref lemon::Preflow "Preflow" class for finding the
     /// maximum flow value.
     PreflowImpl preflow;
@@ -114,7 +114,7 @@
 		    Node _s, Node _t ) :
       graph(_graph), capacity(_capacity), cost(_cost),
       source(_s), target(_t), flow(_graph),
-      preflow(_graph, _s, _t, _capacity, flow)
+      preflow(_graph, _capacity, _s, _t)
     {}
 
     /// \brief Returns a const reference to the flow map.
@@ -141,7 +141,8 @@
 
     /// \brief Runs the algorithm.
     void run() {
-      preflow.phase1();
+      preflow.flowMap(flow);
+      preflow.runMinCut();
       MinCostFlowImpl mcf_impl( graph, capacity, cost,
 				source, target, preflow.flowValue() );
       mcf_impl.run();



More information about the Lemon-commits mailing list