COIN-OR::LEMON - Graph Library

Changeset 113:cf7b01232d86 in lemon-0.x


Ignore:
Timestamp:
02/22/04 13:17:16 (20 years ago)
Author:
jacint
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@148
Message:

* empty log message *

Location:
src/work/jacint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/work/jacint/preflow.cc

    r109 r113  
    3131  }
    3232
    33   preflow<ListGraph, int> max_flow_test(G, s, t, cap);
    34  
     33  double pre_time=currTime();
     34    preflow<ListGraph, int> max_flow_test(G, s, t, cap);
     35  double post_time=currTime();
     36   
    3537  ListGraph::NodeMap<bool> cut(G);
    3638  max_flow_test.minCut(cut);
     
    5759 
    5860  std::cout << "min time of 10 runs: " << mintime << " sec"<< std::endl;
     61  std::cout << "phase 0: " << max_flow_test.time-pre_time
     62            << " sec"<< std::endl;
     63  std::cout << "phase 1: " << post_time-max_flow_test.time
     64            << " sec"<< std::endl;
    5965  std::cout << "flow value: "<< max_flow_test.maxFlow() << std::endl;
    6066  std::cout << "min cut value: "<< min_cut_value << std::endl;
  • src/work/jacint/preflow.h

    r109 r113  
    99 stack 'active' on the active nodes on level i implemented by hand
    1010 runs heuristic 'highest label' for H1*n relabels
    11  runs heuristic 'dound decrease' for H0*n relabels, starts with 'highest label'
     11 runs heuristic 'bound decrease' for H0*n relabels, starts with 'highest label'
    1212 
    1313Parameters H0 and H1 are initialized to 20 and 10.
     
    4444#include <vector>
    4545#include <queue>
     46
     47#include <time_measure.h>
    4648
    4749namespace hugo {
     
    6668
    6769  public:
    68    
     70    double time;
    6971    preflow(Graph& _G, NodeIt _s, NodeIt _t, CapMap& _capacity ) :
    7072      G(_G), s(_s), t(_t), flow(_G, 0), capacity(_capacity)
     
    167169          } else {
    168170            phase=1;
    169 
     171            time=currTime();
    170172            level.set(s,0);
    171173            std::queue<NodeIt> bfs_queue;
Note: See TracChangeset for help on using the changeset viewer.