src/work/marci/leda/comparison.cc
changeset 648 8c13444bccf6
parent 617 dc17013b0e52
child 768 a5e9303a5511
     1.1 --- a/src/work/marci/leda/comparison.cc	Wed May 19 16:09:38 2004 +0000
     1.2 +++ b/src/work/marci/leda/comparison.cc	Wed May 19 16:20:10 2004 +0000
     1.3 @@ -10,11 +10,11 @@
     1.4  #include <LEDA/graph_gen.h>
     1.5  
     1.6  #include <leda_graph_wrapper.h>
     1.7 -#include <list_graph.h>
     1.8 +#include <sage_graph.h>
     1.9  //#include <smart_graph.h>
    1.10  //#include <dimacs.h>
    1.11  #include <hugo/time_measure.h>
    1.12 -#include <for_each_macros.h>
    1.13 +#include <hugo/for_each_macros.h>
    1.14  #include <hugo/graph_wrapper.h>
    1.15  #include <bipartite_graph_wrapper.h>
    1.16  #include <hugo/maps.h>
    1.17 @@ -51,8 +51,8 @@
    1.18    typedef LedaGraphWrapper<leda::graph> Graph;
    1.19    Graph g(lg);
    1.20  
    1.21 -  //for UndirListGraph
    1.22 -  //typedef UndirListGraph Graph; 
    1.23 +  //for UndirSageGraph
    1.24 +  //typedef UndirSageGraph Graph; 
    1.25    //Graph g;
    1.26  
    1.27    typedef Graph::Node Node;
    1.28 @@ -123,7 +123,7 @@
    1.29  
    1.30  //   ts.reset();
    1.31  //   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0);
    1.32 -//   typedef ListGraph MutableGraph;
    1.33 +//   typedef SageGraph MutableGraph;
    1.34  //   while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { }
    1.35  //   std::cout << "HUGO max matching algorithm based on blocking flow augmentation." 
    1.36  // 	    << std::endl << "Matching size: " 
    1.37 @@ -131,11 +131,11 @@
    1.38  //   std::cout << "elapsed time: " << ts << std::endl << std::endl;
    1.39  
    1.40    {
    1.41 -  ListGraph hg;
    1.42 -  ListGraph::Node s=hg.addNode();  
    1.43 -  ListGraph::Node t=hg.addNode();
    1.44 -  BGW::NodeMap<ListGraph::Node> b_s_nodes(bgw);  
    1.45 -  BGW::NodeMap<ListGraph::Node> b_t_nodes(bgw);
    1.46 +  SageGraph hg;
    1.47 +  SageGraph::Node s=hg.addNode();  
    1.48 +  SageGraph::Node t=hg.addNode();
    1.49 +  BGW::NodeMap<SageGraph::Node> b_s_nodes(bgw);  
    1.50 +  BGW::NodeMap<SageGraph::Node> b_t_nodes(bgw);
    1.51    
    1.52    FOR_EACH_INC_LOC(BGW::ClassNodeIt, n, bgw, BGW::S_CLASS) {
    1.53      b_s_nodes.set(n, hg.addNode());
    1.54 @@ -149,17 +149,17 @@
    1.55    FOR_EACH_LOC(BGW::EdgeIt, e, bgw) 
    1.56      hg.addEdge(b_s_nodes[bgw.tail(e)], b_t_nodes[bgw.head(e)]);
    1.57  
    1.58 -  ConstMap<ListGraph::Edge, int> cm(1);
    1.59 -  ListGraph::EdgeMap<int> flow(hg); //0
    1.60 +  ConstMap<SageGraph::Edge, int> cm(1);
    1.61 +  SageGraph::EdgeMap<int> flow(hg); //0
    1.62    
    1.63    Timer ts;
    1.64  
    1.65    ts.reset();
    1.66 -  MaxFlow<ListGraph, int, ConstMap<ListGraph::Edge, int>, 
    1.67 -    ListGraph::EdgeMap<int> > 
    1.68 +  MaxFlow<SageGraph, int, ConstMap<SageGraph::Edge, int>, 
    1.69 +    SageGraph::EdgeMap<int> > 
    1.70      max_flow_test(hg, s, t, cm, flow);
    1.71    max_flow_test.run();
    1.72 -  std::cout << "HUGO max matching algorithm on ListGraph by copying the graph, based on preflow." 
    1.73 +  std::cout << "HUGO max matching algorithm on SageGraph by copying the graph, based on preflow." 
    1.74  	    << std::endl 
    1.75  	    << "Size of matching: " 
    1.76  	    << max_flow_test.flowValue() << std::endl;