Changeset 482:dce64ce044d6 in lemon-0.x for src/work/marci/leda/bipartite_matching_leda.cc
- Timestamp:
- 04/29/04 18:59:00 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@639
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/leda/bipartite_matching_leda.cc
r459 r482 19 19 #include <graph_wrapper.h> 20 20 #include <maps.h> 21 #include <edmonds_karp.h> 22 #include <preflow.h> 21 #include <max_flow.h> 23 22 24 23 /** … … 102 101 103 102 Timer ts; 103 stGW::EdgeMap<int> flow(stgw); 104 MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 105 max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow); 106 104 107 ts.reset(); 105 stGW::EdgeMap<int> max_flow(stgw); 106 MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 107 max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, max_flow); 108 FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); 108 109 // while (max_flow_test.augmentOnShortestPath()) { } 109 110 typedef ListGraph MutableGraph; … … 114 115 std::cout << "max flow value: " << max_flow_test.flowValue() << std::endl; 115 116 std::cout << "elapsed time: " << ts << std::endl; 116 // FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {117 // std::cout << e << ": " << max_flow[e] << "\n";118 // }119 // std::cout << "\n";120 117 121 118 ts.reset(); 122 stGW::EdgeMap<int> pre_flow(stgw); 123 Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 124 pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow/*, true*/); 125 pre_flow_test.run(); 119 FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); 120 max_flow_test.run(); 126 121 std::cout << "pre flow value: " << max_flow_test.flowValue() << std::endl; 127 122 std::cout << "elapsed time: " << ts << std::endl; 128 // FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {129 // std::cout << e << ": " << pre_flow[e] << "\n";130 // }131 // std::cout << "\n";132 123 133 124 ts.reset(); 134 125 leda_list<leda_edge> ml=MAX_CARD_BIPARTITE_MATCHING(lg); 135 // stGW::EdgeMap<int> pre_flow(stgw);136 //Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >137 // pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow, true);138 //pre_flow_test.run();139 126 std::cout << "leda matching value: " << ml.size() << std::endl; 140 127 std::cout << "elapsed time: " << ts << std::endl; 141 // FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {142 // std::cout << e << ": " << pre_flow[e] << "\n";143 // }144 // std::cout << "\n";145 128 146 129 return 0;
Note: See TracChangeset
for help on using the changeset viewer.