Changeset 465:d72e56f1730d in lemon-0.x
- Timestamp:
- 04/29/04 11:08:14 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@616
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/include/dimacs.h
r442 r465 21 21 /// If the data is a shortest path problem instance then \c s will be the 22 22 /// source node and \c capacity will contain the edge lengths. 23 /// 24 ///\author Marton Makai 23 25 template<typename Graph, typename CapacityMap> 24 26 void readDimacsMaxFlow(std::istream& is, Graph &g, typename Graph::Node &s, typename Graph::Node &t, CapacityMap& capacity) { -
src/work/jacint/preflow.h
r451 r465 63 63 Node s; 64 64 Node t; 65 CapMap* capacity;65 const CapMap* capacity; 66 66 FlowMap* flow; 67 67 int n; //the number of nodes of G … … 78 78 }; 79 79 80 Preflow( Graph& _G, Node _s, Node _t,CapMap& _capacity,80 Preflow(const Graph& _G, Node _s, Node _t, const CapMap& _capacity, 81 81 FlowMap& _flow) : 82 82 G(_G), s(_s), t(_t), capacity(&_capacity), … … 154 154 break; 155 155 } 156 // default: 157 // break; 158 // ZERO_FLOW ize kell 159 156 160 } 157 161 -
src/work/marci/bipartite_matching_try.cc
r410 r465 182 182 stGW::EdgeMap<int> pre_flow(stgw); 183 183 Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 184 pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow , true);184 pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow/*, true*/); 185 185 pre_flow_test.run(); 186 186 std::cout << "pre flow value: " << max_flow_test.flowValue() << std::endl; -
src/work/marci/edmonds_karp_demo.cc
r418 r465 72 72 Graph::EdgeMap<int> flow(G); //0 flow 73 73 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 74 pre_flow_test(G, s, t, cap, flow , true);74 pre_flow_test(G, s, t, cap, flow/*, true*/); 75 75 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 76 pre_flow_ize(G, s, t, cap, flow , false);77 PreflowRes<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >78 pre_flow_res(G, s, t, cap, flow, true);76 pre_flow_ize(G, s, t, cap, flow/*, false*/); 77 // PreflowRes<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 78 // pre_flow_res(G, s, t, cap, flow/*, true*/); 79 79 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 80 80 max_flow_test(G, s, t, cap, flow); … … 92 92 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0); 93 93 ts.reset(); 94 pre_flow_ize. run();94 pre_flow_ize.preflow(Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::GEN_FLOW); 95 95 std::cout << "elapsed time: " << ts << std::endl; 96 96 std::cout << "flow value: "<< pre_flow_ize.flowValue() << std::endl; 97 97 } 98 98 99 {100 std::cout << "wrapped preflow ..." << std::endl;101 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);102 ts.reset();103 pre_flow_res.run();104 std::cout << "elapsed time: " << ts << std::endl;105 std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl;106 }99 // { 100 // std::cout << "wrapped preflow ..." << std::endl; 101 // FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0); 102 // ts.reset(); 103 // pre_flow_res.run(); 104 // std::cout << "elapsed time: " << ts << std::endl; 105 // std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl; 106 // } 107 107 108 108 { -
src/work/marci/lg_vs_sg.cc
r379 r465 36 36 Graph::EdgeMap<int> flow(G); //0 flow 37 37 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 38 pre_flow_test(G, s, t, cap, flow , true);38 pre_flow_test(G, s, t, cap, flow/*, true*/); 39 39 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 40 40 max_flow_test(G, s, t, cap, flow); … … 110 110 Graph::EdgeMap<int> flow(G); //0 flow 111 111 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 112 pre_flow_test(G, s, t, cap, flow , true);112 pre_flow_test(G, s, t, cap, flow/*, true*/); 113 113 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 114 114 max_flow_test(G, s, t, cap, flow);
Note: See TracChangeset
for help on using the changeset viewer.