COIN-OR::LEMON - Graph Library

Changeset 762:511200bdb71f in lemon-0.x for src/work


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

technical corrections

Location:
src/work
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • src/work/makefile

    r673 r762  
    11INCLUDEDIRS ?= -I.. -I. -I./{marci,jacint,alpar,klao,akos}
    2 CXXFLAGS = -g -O3 -W -Wall $(INCLUDEDIRS) -ansi -pedantic
     2CXXFLAGS = -g -O2 -W -Wall $(INCLUDEDIRS) -ansi -pedantic
    33
    44BINARIES ?= bin_heap_demo
  • src/work/marci/bfs_dfs_misc.h

    r640 r762  
    1212
    1313#include <bfs_dfs.h>
    14 #include <hugo/for_each_macros.h>
     14#include <for_each_macros.h>
    1515
    1616namespace hugo {
  • src/work/marci/bfsit_vs_byhand.cc

    r642 r762  
    77#include <hugo/dimacs.h>
    88#include <hugo/time_measure.h>
    9 #include <hugo/for_each_macros.h>
     9//#include <hugo/for_each_macros.h>
    1010#include <bfs_dfs.h>
    1111
     
    2222  Graph g;
    2323  Node s, t;
    24   Graph::EdgeMap<int> cap(g);
     24  //Graph::EdgeMap<int> cap(g);
    2525  //readDimacsMaxFlow(std::cin, g, s, t, cap);
    2626  readDimacs(std::cin, g);
  • src/work/marci/bipartite_graph_wrapper.h

    r641 r762  
    1414#include <iter_map.h>
    1515#include <hugo/graph_wrapper.h>
     16#include <for_each_macros.h>
    1617
    1718namespace hugo {
  • src/work/marci/bipartite_graph_wrapper_test.cc

    r642 r762  
    88//#include <dimacs.h>
    99#include <hugo/time_measure.h>
    10 #include <hugo/for_each_macros.h>
     10#include <for_each_macros.h>
    1111#include <bfs_dfs.h>
    1212#include <hugo/graph_wrapper.h>
    1313#include <bipartite_graph_wrapper.h>
    1414#include <hugo/maps.h>
    15 #include <max_flow.h>
     15#include <hugo/max_flow.h>
     16#include <augmenting_flow.h>
    1617
    1718using namespace hugo;
     
    134135  }
    135136 
    136   MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
     137  AugmentingFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
    137138    max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow);
    138139  while (max_flow_test.augmentOnShortestPath()) { }
  • src/work/marci/bipartite_matching_try.cc

    r642 r762  
    99//#include <dimacs.h>
    1010#include <hugo/time_measure.h>
    11 #include <hugo/for_each_macros.h>
     11#include <for_each_macros.h>
    1212#include <bfs_dfs.h>
    1313#include <hugo/graph_wrapper.h>
    1414#include <bipartite_graph_wrapper.h>
    1515#include <hugo/maps.h>
    16 #include <max_flow.h>
     16#include <hugo/max_flow.h>
     17#include <augmenting_flow.h>
    1718
    1819/**
     
    164165  ts.reset();
    165166  stGW::EdgeMap<int> max_flow(stgw);
    166   MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
     167  AugmentingFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
    167168    max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, max_flow);
    168169//  while (max_flow_test.augmentOnShortestPath()) { }
  • src/work/marci/bipartite_matching_try_3.cc

    r642 r762  
    88//#include <dimacs.h>
    99#include <hugo/time_measure.h>
    10 #include <hugo/for_each_macros.h>
     10#include <for_each_macros.h>
    1111#include <bfs_dfs.h>
    1212#include <bipartite_graph_wrapper.h>
    1313#include <hugo/maps.h>
    14 #include <max_flow.h>
     14#include <hugo/max_flow.h>
    1515#include <graph_gen.h>
    1616#include <max_bipartite_matching.h>
  • 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;
  • src/work/marci/macro_test.cc

    r642 r762  
    44
    55#include <sage_graph.h>
    6 #include <hugo/for_each_macros.h>
     6#include <for_each_macros.h>
    77
    88using namespace hugo;
  • src/work/marci/makefile

    r654 r762  
    22CXX3=$(CXX)
    33BOOSTROOT ?= /home/marci/boost
    4 INCLUDEDIRS ?= -I../.. -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)
     4INCLUDEDIRS ?= -I../{jacint,marci,alpar,klao,akos,athos} -I../.. -I.. -I$(BOOSTROOT)
    55
    66LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
    77BINARIES = max_flow_demo iterator_bfs_demo macro_test lg_vs_sg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try bipartite_matching_try_3 top_sort_test max_flow_1
     8#BINARIES = preflow_bug
    89#gw_vs_not preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar preflow_demo_leda
    910
  • src/work/marci/max_bipartite_matching.h

    r615 r762  
    1616#include <bipartite_graph_wrapper.h>
    1717//#include <hugo/maps.h>
    18 #include <max_flow.h>
     18#include <hugo/max_flow.h>
    1919
    2020namespace hugo {
  • src/work/marci/max_flow_1.cc

    r642 r762  
    88#include <hugo/time_measure.h>
    99//#include <graph_wrapper.h>
    10 #include <max_flow.h>
     10#include <hugo/max_flow.h>
    1111//#include <preflow_res.h>
    12 #include <hugo/for_each_macros.h>
     12#include <for_each_macros.h>
    1313
    1414using namespace hugo;
  • 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) {
  • src/work/marci/top_sort_test.cc

    r642 r762  
    99#include <hugo/graph_wrapper.h>
    1010#include <hugo/maps.h>
    11 #include <hugo/for_each_macros.h>
     11#include <for_each_macros.h>
    1212
    1313using namespace hugo;
Note: See TracChangeset for help on using the changeset viewer.