Changeset 648:8c13444bccf6 in lemon0.x for src/work/marci/leda/comparison.cc
 Timestamp:
 05/19/04 18:20:10 (18 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@848
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/leda/comparison.cc
r617 r648 11 11 12 12 #include <leda_graph_wrapper.h> 13 #include < list_graph.h>13 #include <sage_graph.h> 14 14 //#include <smart_graph.h> 15 15 //#include <dimacs.h> 16 16 #include <hugo/time_measure.h> 17 #include < for_each_macros.h>17 #include <hugo/for_each_macros.h> 18 18 #include <hugo/graph_wrapper.h> 19 19 #include <bipartite_graph_wrapper.h> … … 52 52 Graph g(lg); 53 53 54 //for Undir ListGraph55 //typedef Undir ListGraph Graph;54 //for UndirSageGraph 55 //typedef UndirSageGraph Graph; 56 56 //Graph g; 57 57 … … 124 124 // ts.reset(); 125 125 // FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); 126 // typedef ListGraph MutableGraph;126 // typedef SageGraph MutableGraph; 127 127 // while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { } 128 128 // std::cout << "HUGO max matching algorithm based on blocking flow augmentation." … … 132 132 133 133 { 134 ListGraph hg;135 ListGraph::Node s=hg.addNode();136 ListGraph::Node t=hg.addNode();137 BGW::NodeMap< ListGraph::Node> b_s_nodes(bgw);138 BGW::NodeMap< ListGraph::Node> b_t_nodes(bgw);134 SageGraph hg; 135 SageGraph::Node s=hg.addNode(); 136 SageGraph::Node t=hg.addNode(); 137 BGW::NodeMap<SageGraph::Node> b_s_nodes(bgw); 138 BGW::NodeMap<SageGraph::Node> b_t_nodes(bgw); 139 139 140 140 FOR_EACH_INC_LOC(BGW::ClassNodeIt, n, bgw, BGW::S_CLASS) { … … 150 150 hg.addEdge(b_s_nodes[bgw.tail(e)], b_t_nodes[bgw.head(e)]); 151 151 152 ConstMap< ListGraph::Edge, int> cm(1);153 ListGraph::EdgeMap<int> flow(hg); //0152 ConstMap<SageGraph::Edge, int> cm(1); 153 SageGraph::EdgeMap<int> flow(hg); //0 154 154 155 155 Timer ts; 156 156 157 157 ts.reset(); 158 MaxFlow< ListGraph, int, ConstMap<ListGraph::Edge, int>,159 ListGraph::EdgeMap<int> >158 MaxFlow<SageGraph, int, ConstMap<SageGraph::Edge, int>, 159 SageGraph::EdgeMap<int> > 160 160 max_flow_test(hg, s, t, cm, flow); 161 161 max_flow_test.run(); 162 std::cout << "HUGO max matching algorithm on ListGraph by copying the graph, based on preflow."162 std::cout << "HUGO max matching algorithm on SageGraph by copying the graph, based on preflow." 163 163 << std::endl 164 164 << "Size of matching: "
Note: See TracChangeset
for help on using the changeset viewer.