Changeset 376:5c12f3515452 in lemon-0.x for src/work/marci/edmonds_karp_demo.cc
- Timestamp:
- 04/22/04 18:07:17 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@506
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/edmonds_karp_demo.cc
r333 r376 10 10 //#include <graph_wrapper.h> 11 11 #include <preflow.h> 12 #include <preflowproba.h> 12 13 #include <for_each_macros.h> 13 14 … … 71 72 Graph::EdgeMap<int> flow(G); //0 flow 72 73 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 73 pre_flow_test(G, s, t, cap, flow); 74 pre_flow_test(G, s, t, cap, flow, true); 75 PreflowProba<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 76 pre_flow_proba(G, s, t, cap, flow, true, true); 74 77 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 75 78 max_flow_test(G, s, t, cap, flow); … … 79 82 ts.reset(); 80 83 pre_flow_test.run(); 84 std::cout << "elapsed time: " << ts << std::endl; 85 std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl; 86 } 87 88 { 89 std::cout << "wrapped preflow ..." << std::endl; 90 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0); 91 ts.reset(); 92 pre_flow_proba.run(); 81 93 std::cout << "elapsed time: " << ts << std::endl; 82 94 std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.