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

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


Author: jacint
Date: Sun Feb 22 13:17:16 2004
New Revision: 148

Modified:
   hugo/trunk/src/work/jacint/preflow.cc
   hugo/trunk/src/work/jacint/preflow.h

Log:
*** empty log message ***


Modified: hugo/trunk/src/work/jacint/preflow.cc
==============================================================================
--- hugo/trunk/src/work/jacint/preflow.cc	(original)
+++ hugo/trunk/src/work/jacint/preflow.cc	Sun Feb 22 13:17:16 2004
@@ -30,8 +30,10 @@
     if ( mintime > post_time-pre_time ) mintime = post_time-pre_time;
   }
 
-  preflow<ListGraph, int> max_flow_test(G, s, t, cap);
-  
+  double pre_time=currTime();
+    preflow<ListGraph, int> max_flow_test(G, s, t, cap);
+  double post_time=currTime();
+    
   ListGraph::NodeMap<bool> cut(G);
   max_flow_test.minCut(cut); 
   int min_cut_value=0;
@@ -56,6 +58,10 @@
       }
   
   std::cout << "min time of 10 runs: " << mintime << " sec"<< std::endl; 
+  std::cout << "phase 0: " << max_flow_test.time-pre_time 
+	    << " sec"<< std::endl; 
+  std::cout << "phase 1: " << post_time-max_flow_test.time 
+	    << " sec"<< std::endl; 
   std::cout << "flow value: "<< max_flow_test.maxFlow() << std::endl;
   std::cout << "min cut value: "<< min_cut_value << std::endl;
   std::cout << "min min cut value: "<< min_min_cut_value << std::endl;

Modified: hugo/trunk/src/work/jacint/preflow.h
==============================================================================
--- hugo/trunk/src/work/jacint/preflow.h	(original)
+++ hugo/trunk/src/work/jacint/preflow.h	Sun Feb 22 13:17:16 2004
@@ -8,7 +8,7 @@
  list 'level_list' on the nodes on level i implemented by hand
  stack 'active' on the active nodes on level i implemented by hand
  runs heuristic 'highest label' for H1*n relabels
- runs heuristic 'dound decrease' for H0*n relabels, starts with 'highest label'
+ runs heuristic 'bound decrease' for H0*n relabels, starts with 'highest label'
  
 Parameters H0 and H1 are initialized to 20 and 10.
 
@@ -44,6 +44,8 @@
 #include <vector>
 #include <queue>
 
+#include <time_measure.h>
+
 namespace hugo {
 
   template <typename Graph, typename T, 
@@ -65,7 +67,7 @@
     T value;
 
   public:
-    
+    double time;
     preflow(Graph& _G, NodeIt _s, NodeIt _t, CapMap& _capacity ) :
       G(_G), s(_s), t(_t), flow(_G, 0), capacity(_capacity)
     {
@@ -166,7 +168,7 @@
 	    end=true;
 	  } else {
 	    phase=1;
-
+	    time=currTime();
 	    level.set(s,0);
 	    std::queue<NodeIt> bfs_queue;
 	    bfs_queue.push(s);



More information about the Lemon-commits mailing list