Changeset 849:cc3867a7d380 in lemon-0.x for src/work
- Timestamp:
- 09/14/04 12:09:24 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1148
- Location:
- src/work/marci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/graph_wrapper_time.cc
r784 r849 11 11 #include <hugo/time_measure.h> 12 12 #include <hugo/graph_wrapper.h> 13 #include <hugo/ max_flow.h>13 #include <hugo/preflow.h> 14 14 #include <hugo/dimacs.h> 15 15 #include <hugo/list_graph.h> … … 33 33 ts.reset(); 34 34 35 typedef MaxFlow<Graph, int, FlowMap, FlowMap> MyMaxFlow;36 My MaxFlow max_flow(g, s, t, cap, flow);37 max_flow.run(My MaxFlow::NO_FLOW);35 typedef Preflow<Graph, int, FlowMap, FlowMap> MyPreflow; 36 MyPreflow max_flow(g, s, t, cap, flow); 37 max_flow.run(MyPreflow::NO_FLOW); 38 38 cout << "flow value: " << max_flow.flowValue() << endl; 39 39 cout << ts << endl; -
src/work/marci/max_flow_demo.cc
r777 r849 13 13 #include <hugo/time_measure.h> 14 14 //#include <graph_wrapper.h> 15 #include <hugo/ max_flow.h>15 #include <hugo/preflow.h> 16 16 #include <augmenting_flow.h> 17 17 //#include <preflow_res.h> … … 39 39 Timer ts; 40 40 Graph::EdgeMap<int> flow(g); //0 flow 41 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >41 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 42 42 max_flow_test(g, s, t, cap, flow); 43 43 AugmentingFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > … … 52 52 std::cout << "elapsed time: " << ts << std::endl; 53 53 std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; 54 max_flow_test. actMinCut(cut);54 max_flow_test.minCut(cut); 55 55 56 56 FOR_EACH_LOC(Graph::EdgeIt, e, g) { … … 66 66 FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); 67 67 ts.reset(); 68 max_flow_test.preflow( MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::GEN_FLOW);68 max_flow_test.preflow(Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::GEN_FLOW); 69 69 std::cout << "elapsed time: " << ts << std::endl; 70 70 std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.