COIN-OR::LEMON - Graph Library

Changeset 144:a1323efc5753 in lemon-0.x for src/work/marci


Ignore:
Timestamp:
03/02/04 15:51:13 (17 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@199
Message:

BfsIterator4, DfsIterator4 extension

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/edmonds_karp_demo.cc

    r139 r144  
    5555  ListGraph::EdgeMap<int> flow(G); //0 flow
    5656
    57   double pre_time=currTime();
     57  Timer ts;
     58  ts.reset();
     59  //double pre_time=currTime();
    5860  MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(G, s, t, flow, cap);
    5961  //max_flow_test.augmentWithBlockingFlow<ListGraph>();
    6062  int i=0;
    6163  while (max_flow_test.augmentOnBlockingFlow<ListGraph>()) { ++i; }
    62   double post_time=currTime();
     64  //double post_time=currTime();
    6365
    6466  //std::cout << "maximum flow: "<< std::endl;
     
    6769  //}
    6870  //std::cout<<std::endl;
    69   std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;
     71  std::cout << "elapsed time: " << ts << std::endl;
    7072  std::cout << "number of augmentation phases: " << i << std::endl;
    7173  std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     
    7678  ListGraph::EdgeMap<int> flow(G); //0 flow
    7779
    78   double pre_time=currTime();
     80  Timer ts;
     81  ts.reset();
     82  //double pre_time=currTime();
    7983  MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(G, s, t, flow, cap);
    8084  //max_flow_test.augmentWithBlockingFlow<ListGraph>();
    8185  int i=0;
    8286  while (max_flow_test.augmentOnShortestPath()) { ++i; }
    83   double post_time=currTime();
     87  //double post_time=currTime();
    8488
    8589  //std::cout << "maximum flow: "<< std::endl;
     
    8892  //}
    8993  //std::cout<<std::endl;
    90   std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;
     94  std::cout << "elapsed time: " << ts << std::endl;
    9195  std::cout << "number of augmentation phases: " << i << std::endl;
    9296  std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
Note: See TracChangeset for help on using the changeset viewer.