Changeset 762:511200bdb71f in lemon-0.x for src/work
- Timestamp:
- 08/17/04 13:20:16 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1024
- Location:
- src/work
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/makefile
r673 r762 1 1 INCLUDEDIRS ?= -I.. -I. -I./{marci,jacint,alpar,klao,akos} 2 CXXFLAGS = -g -O 3-W -Wall $(INCLUDEDIRS) -ansi -pedantic2 CXXFLAGS = -g -O2 -W -Wall $(INCLUDEDIRS) -ansi -pedantic 3 3 4 4 BINARIES ?= bin_heap_demo -
src/work/marci/bfs_dfs_misc.h
r640 r762 12 12 13 13 #include <bfs_dfs.h> 14 #include < hugo/for_each_macros.h>14 #include <for_each_macros.h> 15 15 16 16 namespace hugo { -
src/work/marci/bfsit_vs_byhand.cc
r642 r762 7 7 #include <hugo/dimacs.h> 8 8 #include <hugo/time_measure.h> 9 #include <hugo/for_each_macros.h>9 //#include <hugo/for_each_macros.h> 10 10 #include <bfs_dfs.h> 11 11 … … 22 22 Graph g; 23 23 Node s, t; 24 Graph::EdgeMap<int> cap(g);24 //Graph::EdgeMap<int> cap(g); 25 25 //readDimacsMaxFlow(std::cin, g, s, t, cap); 26 26 readDimacs(std::cin, g); -
src/work/marci/bipartite_graph_wrapper.h
r641 r762 14 14 #include <iter_map.h> 15 15 #include <hugo/graph_wrapper.h> 16 #include <for_each_macros.h> 16 17 17 18 namespace hugo { -
src/work/marci/bipartite_graph_wrapper_test.cc
r642 r762 8 8 //#include <dimacs.h> 9 9 #include <hugo/time_measure.h> 10 #include < hugo/for_each_macros.h>10 #include <for_each_macros.h> 11 11 #include <bfs_dfs.h> 12 12 #include <hugo/graph_wrapper.h> 13 13 #include <bipartite_graph_wrapper.h> 14 14 #include <hugo/maps.h> 15 #include <max_flow.h> 15 #include <hugo/max_flow.h> 16 #include <augmenting_flow.h> 16 17 17 18 using namespace hugo; … … 134 135 } 135 136 136 MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >137 AugmentingFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 137 138 max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow); 138 139 while (max_flow_test.augmentOnShortestPath()) { } -
src/work/marci/bipartite_matching_try.cc
r642 r762 9 9 //#include <dimacs.h> 10 10 #include <hugo/time_measure.h> 11 #include < hugo/for_each_macros.h>11 #include <for_each_macros.h> 12 12 #include <bfs_dfs.h> 13 13 #include <hugo/graph_wrapper.h> 14 14 #include <bipartite_graph_wrapper.h> 15 15 #include <hugo/maps.h> 16 #include <max_flow.h> 16 #include <hugo/max_flow.h> 17 #include <augmenting_flow.h> 17 18 18 19 /** … … 164 165 ts.reset(); 165 166 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> > 167 168 max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, max_flow); 168 169 // while (max_flow_test.augmentOnShortestPath()) { } -
src/work/marci/bipartite_matching_try_3.cc
r642 r762 8 8 //#include <dimacs.h> 9 9 #include <hugo/time_measure.h> 10 #include < hugo/for_each_macros.h>10 #include <for_each_macros.h> 11 11 #include <bfs_dfs.h> 12 12 #include <bipartite_graph_wrapper.h> 13 13 #include <hugo/maps.h> 14 #include < max_flow.h>14 #include <hugo/max_flow.h> 15 15 #include <graph_gen.h> 16 16 #include <max_bipartite_matching.h> -
src/work/marci/lg_vs_sg_vs_sg.cc
r643 r762 8 8 #include <hugo/smart_graph.h> 9 9 #include <hugo/dimacs.h> 10 #include <max_flow.h> 10 #include <hugo/max_flow.h> 11 #include <augmenting_flow.h> 11 12 #include <hugo/time_measure.h> 12 #include < hugo/for_each_macros.h>13 #include <for_each_macros.h> 13 14 14 15 using namespace hugo; … … 38 39 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 39 40 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*/); 40 43 41 44 std::cout << "SageGraph ..." << std::endl; … … 54 57 ts.reset(); 55 58 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; 60 63 } 61 64 … … 76 79 ts.reset(); 77 80 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; 82 85 } 83 86 … … 87 90 ts.reset(); 88 91 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; 93 96 } 94 97 } … … 110 113 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 111 114 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*/); 112 117 // MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 113 118 // max_flow_test(g, s, t, cap, flow); … … 129 134 ts.reset(); 130 135 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; 135 140 } 136 141 … … 151 156 ts.reset(); 152 157 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; 157 162 } 158 163 … … 162 167 ts.reset(); 163 168 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; 168 173 } 169 174 } … … 185 190 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 186 191 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*/); 187 194 // MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 188 195 // max_flow_test(g, s, t, cap, flow); … … 204 211 ts.reset(); 205 212 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; 210 217 } 211 218 … … 226 233 ts.reset(); 227 234 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; 232 239 } 233 240 … … 237 244 ts.reset(); 238 245 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; 243 250 } 244 251 } 245 246 247 248 252 249 253 return 0; -
src/work/marci/macro_test.cc
r642 r762 4 4 5 5 #include <sage_graph.h> 6 #include < hugo/for_each_macros.h>6 #include <for_each_macros.h> 7 7 8 8 using namespace hugo; -
src/work/marci/makefile
r654 r762 2 2 CXX3=$(CXX) 3 3 BOOSTROOT ?= /home/marci/boost 4 INCLUDEDIRS ?= -I../ .. -I.. -I../{marci,jacint,alpar,klao,akos,athos}-I$(BOOSTROOT)4 INCLUDEDIRS ?= -I../{jacint,marci,alpar,klao,akos,athos} -I../.. -I.. -I$(BOOSTROOT) 5 5 6 6 LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo 7 7 BINARIES = 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 8 9 #gw_vs_not preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar preflow_demo_leda 9 10 -
src/work/marci/max_bipartite_matching.h
r615 r762 16 16 #include <bipartite_graph_wrapper.h> 17 17 //#include <hugo/maps.h> 18 #include < max_flow.h>18 #include <hugo/max_flow.h> 19 19 20 20 namespace hugo { -
src/work/marci/max_flow_1.cc
r642 r762 8 8 #include <hugo/time_measure.h> 9 9 //#include <graph_wrapper.h> 10 #include < max_flow.h>10 #include <hugo/max_flow.h> 11 11 //#include <preflow_res.h> 12 #include < hugo/for_each_macros.h>12 #include <for_each_macros.h> 13 13 14 14 using namespace hugo; -
src/work/marci/max_flow_demo.cc
r652 r762 8 8 #include <hugo/time_measure.h> 9 9 //#include <graph_wrapper.h> 10 #include <max_flow.h> 10 #include <hugo/max_flow.h> 11 #include <augmenting_flow.h> 11 12 //#include <preflow_res.h> 12 #include < hugo/for_each_macros.h>13 #include <for_each_macros.h> 13 14 #include <graph_concept.h> 14 15 … … 39 40 40 41 //typedef FullFeatureGraphConcept Graph; 41 typedef SmartGraph Graph;42 //typedef SageGraph Graph;42 //typedef SmartGraph Graph; 43 typedef SageGraph Graph; 43 44 typedef Graph::Node Node; 44 45 typedef Graph::EdgeIt EdgeIt; … … 76 77 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 77 78 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 78 82 Graph::NodeMap<bool> cut(g); 79 83 … … 124 128 ts.reset(); 125 129 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; 130 134 131 135 FOR_EACH_LOC(Graph::EdgeIt, e, g) { … … 153 157 ts.reset(); 154 158 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; 159 163 160 164 FOR_EACH_LOC(Graph::EdgeIt, e, g) { … … 171 175 ts.reset(); 172 176 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; 177 181 178 182 FOR_EACH_LOC(Graph::EdgeIt, e, g) { … … 189 193 ts.reset(); 190 194 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; 195 199 196 200 FOR_EACH_LOC(Graph::EdgeIt, e, g) { -
src/work/marci/top_sort_test.cc
r642 r762 9 9 #include <hugo/graph_wrapper.h> 10 10 #include <hugo/maps.h> 11 #include < hugo/for_each_macros.h>11 #include <for_each_macros.h> 12 12 13 13 using namespace hugo;
Note: See TracChangeset
for help on using the changeset viewer.