COIN-OR::LEMON - Graph Library

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

technical corrections

File:
1 edited

Legend:

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

    r643 r762  
    88#include <hugo/smart_graph.h>
    99#include <hugo/dimacs.h>
    10 #include <max_flow.h>
     10#include <hugo/max_flow.h>
     11#include <augmenting_flow.h>
    1112#include <hugo/time_measure.h>
    12 #include <hugo/for_each_macros.h>
     13#include <for_each_macros.h>
    1314
    1415using namespace hugo;
     
    3839    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    3940      max_flow_test(g, s, t, cap, flow/*, true*/);
     41    AugmentingFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     42      augmenting_flow_test(g, s, t, cap, flow/*, true*/);
    4043
    4144    std::cout << "SageGraph ..." << std::endl;
     
    5457      ts.reset();
    5558      int i=0;
    56       while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
    57       std::cout << "elapsed time: " << ts << std::endl;
    58       std::cout << "number of augmentation phases: " << i << std::endl;
    59       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     59      while (augmenting_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
     60      std::cout << "elapsed time: " << ts << std::endl;
     61      std::cout << "number of augmentation phases: " << i << std::endl;
     62      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    6063    }
    6164
     
    7679      ts.reset();
    7780      int i=0;
    78       while (max_flow_test.augmentOnBlockingFlow2()) { ++i; }
    79       std::cout << "elapsed time: " << ts << std::endl;
    80       std::cout << "number of augmentation phases: " << i << std::endl;
    81       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     81      while (augmenting_flow_test.augmentOnBlockingFlow2()) { ++i; }
     82      std::cout << "elapsed time: " << ts << std::endl;
     83      std::cout << "number of augmentation phases: " << i << std::endl;
     84      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    8285    }
    8386
     
    8790      ts.reset();
    8891      int i=0;
    89       while (max_flow_test.augmentOnShortestPath()) { ++i; }
    90       std::cout << "elapsed time: " << ts << std::endl;
    91       std::cout << "number of augmentation phases: " << i << std::endl;
    92       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     92      while (augmenting_flow_test.augmentOnShortestPath()) { ++i; }
     93      std::cout << "elapsed time: " << ts << std::endl;
     94      std::cout << "number of augmentation phases: " << i << std::endl;
     95      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    9396    }
    9497  }
     
    110113    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    111114      max_flow_test(g, s, t, cap, flow/*, true*/);
     115    AugmentingFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     116      augmenting_flow_test(g, s, t, cap, flow/*, true*/);
    112117    //    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    113118    //  max_flow_test(g, s, t, cap, flow);
     
    129134      ts.reset();
    130135      int i=0;
    131       while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
    132       std::cout << "elapsed time: " << ts << std::endl;
    133       std::cout << "number of augmentation phases: " << i << std::endl;
    134       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     136      while (augmenting_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
     137      std::cout << "elapsed time: " << ts << std::endl;
     138      std::cout << "number of augmentation phases: " << i << std::endl;
     139      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    135140    }
    136141
     
    151156      ts.reset();
    152157      int i=0;
    153       while (max_flow_test.augmentOnBlockingFlow2()) { ++i; }
    154       std::cout << "elapsed time: " << ts << std::endl;
    155       std::cout << "number of augmentation phases: " << i << std::endl;
    156       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     158      while (augmenting_flow_test.augmentOnBlockingFlow2()) { ++i; }
     159      std::cout << "elapsed time: " << ts << std::endl;
     160      std::cout << "number of augmentation phases: " << i << std::endl;
     161      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    157162    }
    158163
     
    162167      ts.reset();
    163168      int i=0;
    164       while (max_flow_test.augmentOnShortestPath()) { ++i; }
    165       std::cout << "elapsed time: " << ts << std::endl;
    166       std::cout << "number of augmentation phases: " << i << std::endl;
    167       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     169      while (augmenting_flow_test.augmentOnShortestPath()) { ++i; }
     170      std::cout << "elapsed time: " << ts << std::endl;
     171      std::cout << "number of augmentation phases: " << i << std::endl;
     172      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    168173    }
    169174  }
     
    185190    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    186191      max_flow_test(g, s, t, cap, flow/*, true*/);
     192    AugmentingFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     193      augmenting_flow_test(g, s, t, cap, flow/*, true*/);
    187194    //    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    188195    //  max_flow_test(g, s, t, cap, flow);
     
    204211      ts.reset();
    205212      int i=0;
    206       while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
    207       std::cout << "elapsed time: " << ts << std::endl;
    208       std::cout << "number of augmentation phases: " << i << std::endl;
    209       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     213      while (augmenting_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
     214      std::cout << "elapsed time: " << ts << std::endl;
     215      std::cout << "number of augmentation phases: " << i << std::endl;
     216      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    210217    }
    211218
     
    226233      ts.reset();
    227234      int i=0;
    228       while (max_flow_test.augmentOnBlockingFlow2()) { ++i; }
    229       std::cout << "elapsed time: " << ts << std::endl;
    230       std::cout << "number of augmentation phases: " << i << std::endl;
    231       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     235      while (augmenting_flow_test.augmentOnBlockingFlow2()) { ++i; }
     236      std::cout << "elapsed time: " << ts << std::endl;
     237      std::cout << "number of augmentation phases: " << i << std::endl;
     238      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    232239    }
    233240
     
    237244      ts.reset();
    238245      int i=0;
    239       while (max_flow_test.augmentOnShortestPath()) { ++i; }
    240       std::cout << "elapsed time: " << ts << std::endl;
    241       std::cout << "number of augmentation phases: " << i << std::endl;
    242       std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     246      while (augmenting_flow_test.augmentOnShortestPath()) { ++i; }
     247      std::cout << "elapsed time: " << ts << std::endl;
     248      std::cout << "number of augmentation phases: " << i << std::endl;
     249      std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    243250    }
    244251  }
    245 
    246 
    247 
    248252
    249253  return 0;
Note: See TracChangeset for help on using the changeset viewer.