[Lemon-commits] [lemon_svn] jacint: r115 - hugo/trunk/src/work/jacint

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


Author: jacint
Date: Tue Feb 17 12:43:22 2004
New Revision: 115

Modified:
   hugo/trunk/src/work/jacint/preflow_push_hl.h

Log:
fast version


Modified: hugo/trunk/src/work/jacint/preflow_push_hl.h
==============================================================================
--- hugo/trunk/src/work/jacint/preflow_push_hl.h	(original)
+++ hugo/trunk/src/work/jacint/preflow_push_hl.h	Tue Feb 17 12:43:22 2004
@@ -25,7 +25,8 @@
 #ifndef PREFLOW_PUSH_HL_H
 #define PREFLOW_PUSH_HL_H
 
-//#include <algorithm>
+#define A 1
+
 #include <vector>
 #include <stack>
 
@@ -64,6 +65,8 @@
     */
     void run() {
  
+      std::cout<<"A is "<<A<<" ";
+
       typename Graph::NodeMap<int> level(G);      
       typename Graph::NodeMap<T> excess(G); 
 
@@ -220,7 +223,7 @@
 	    if ( oldlevel < n ) {
 	      --numb[oldlevel];
 
-	      if ( !numb[oldlevel] ) {  //If the level of w gets empty. 
+	      if ( !numb[oldlevel] && oldlevel < A*n ) {  //If the level of w gets empty. 
 		
 		for (EachNodeIt v=G.template first<EachNodeIt>(); v.valid() ; ++v) {
 		  if (level.get(v) > oldlevel && level.get(v) < n ) level.set(v,n);  
@@ -268,7 +271,7 @@
       For the maximum flow x found by the algorithm, it returns the flow value on Edge e, i.e. x(e). 
     */
 
-    T flowonEdge(EdgeIt e) {
+    T flowonedge(EdgeIt e) {
       return flow.get(e);
     }
 



More information about the Lemon-commits mailing list