Changeset 144:a1323efc5753 in lemon-0.x for src/work/marci
- Timestamp:
- 03/02/04 15:51:13 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@199
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/edmonds_karp_demo.cc
r139 r144 55 55 ListGraph::EdgeMap<int> flow(G); //0 flow 56 56 57 double pre_time=currTime(); 57 Timer ts; 58 ts.reset(); 59 //double pre_time=currTime(); 58 60 MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(G, s, t, flow, cap); 59 61 //max_flow_test.augmentWithBlockingFlow<ListGraph>(); 60 62 int i=0; 61 63 while (max_flow_test.augmentOnBlockingFlow<ListGraph>()) { ++i; } 62 double post_time=currTime();64 //double post_time=currTime(); 63 65 64 66 //std::cout << "maximum flow: "<< std::endl; … … 67 69 //} 68 70 //std::cout<<std::endl; 69 std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;71 std::cout << "elapsed time: " << ts << std::endl; 70 72 std::cout << "number of augmentation phases: " << i << std::endl; 71 73 std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; … … 76 78 ListGraph::EdgeMap<int> flow(G); //0 flow 77 79 78 double pre_time=currTime(); 80 Timer ts; 81 ts.reset(); 82 //double pre_time=currTime(); 79 83 MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(G, s, t, flow, cap); 80 84 //max_flow_test.augmentWithBlockingFlow<ListGraph>(); 81 85 int i=0; 82 86 while (max_flow_test.augmentOnShortestPath()) { ++i; } 83 double post_time=currTime();87 //double post_time=currTime(); 84 88 85 89 //std::cout << "maximum flow: "<< std::endl; … … 88 92 //} 89 93 //std::cout<<std::endl; 90 std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;94 std::cout << "elapsed time: " << ts << std::endl; 91 95 std::cout << "number of augmentation phases: " << i << std::endl; 92 96 std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.