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/max_flow_demo.cc

    r652 r762  
    88#include <hugo/time_measure.h>
    99//#include <graph_wrapper.h>
    10 #include <max_flow.h>
     10#include <hugo/max_flow.h>
     11#include <augmenting_flow.h>
    1112//#include <preflow_res.h>
    12 #include <hugo/for_each_macros.h>
     13#include <for_each_macros.h>
    1314#include <graph_concept.h>
    1415
     
    3940
    4041  //typedef FullFeatureGraphConcept Graph;
    41   typedef SmartGraph Graph;
    42   //  typedef SageGraph Graph;
     42  //typedef SmartGraph Graph;
     43  typedef SageGraph Graph;
    4344  typedef Graph::Node Node;
    4445  typedef Graph::EdgeIt EdgeIt;
     
    7677  MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    7778    max_flow_test(g, s, t, cap, flow);
     79  AugmentingFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     80    augmenting_flow_test(g, s, t, cap, flow);
     81 
    7882  Graph::NodeMap<bool> cut(g);
    7983
     
    124128    ts.reset();
    125129    int i=0;
    126     while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
    127     std::cout << "elapsed time: " << ts << std::endl;
    128     std::cout << "number of augmentation phases: " << i << std::endl;
    129     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     130    while (augmenting_flow_test.augmentOnBlockingFlow<MutableGraph>()) { ++i; }
     131    std::cout << "elapsed time: " << ts << std::endl;
     132    std::cout << "number of augmentation phases: " << i << std::endl;
     133    std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    130134
    131135    FOR_EACH_LOC(Graph::EdgeIt, e, g) {
     
    153157    ts.reset();
    154158    int i=0;
    155     while (max_flow_test.augmentOnBlockingFlow2()) { ++i; }
    156     std::cout << "elapsed time: " << ts << std::endl;
    157     std::cout << "number of augmentation phases: " << i << std::endl;
    158     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     159    while (augmenting_flow_test.augmentOnBlockingFlow2()) { ++i; }
     160    std::cout << "elapsed time: " << ts << std::endl;
     161    std::cout << "number of augmentation phases: " << i << std::endl;
     162    std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    159163
    160164    FOR_EACH_LOC(Graph::EdgeIt, e, g) {
     
    171175    ts.reset();
    172176    int i=0;
    173     while (max_flow_test.augmentOnShortestPath()) { ++i; }
    174     std::cout << "elapsed time: " << ts << std::endl;
    175     std::cout << "number of augmentation phases: " << i << std::endl;
    176     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     177    while (augmenting_flow_test.augmentOnShortestPath()) { ++i; }
     178    std::cout << "elapsed time: " << ts << std::endl;
     179    std::cout << "number of augmentation phases: " << i << std::endl;
     180    std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    177181
    178182    FOR_EACH_LOC(Graph::EdgeIt, e, g) {
     
    189193    ts.reset();
    190194    int i=0;
    191     while (max_flow_test.augmentOnShortestPath2()) { ++i; }
    192     std::cout << "elapsed time: " << ts << std::endl;
    193     std::cout << "number of augmentation phases: " << i << std::endl;
    194     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
     195    while (augmenting_flow_test.augmentOnShortestPath2()) { ++i; }
     196    std::cout << "elapsed time: " << ts << std::endl;
     197    std::cout << "number of augmentation phases: " << i << std::endl;
     198    std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl;
    195199
    196200    FOR_EACH_LOC(Graph::EdgeIt, e, g) {
Note: See TracChangeset for help on using the changeset viewer.