1.1 --- a/src/include/dimacs.h Thu Apr 29 08:42:05 2004 +0000
1.2 +++ b/src/include/dimacs.h Thu Apr 29 09:08:14 2004 +0000
1.3 @@ -20,6 +20,8 @@
1.4 /// and \c capacity will contain the edge capacities.
1.5 /// If the data is a shortest path problem instance then \c s will be the
1.6 /// source node and \c capacity will contain the edge lengths.
1.7 + ///
1.8 + ///\author Marton Makai
1.9 template<typename Graph, typename CapacityMap>
1.10 void readDimacsMaxFlow(std::istream& is, Graph &g, typename Graph::Node &s, typename Graph::Node &t, CapacityMap& capacity) {
1.11 g.clear();
2.1 --- a/src/work/jacint/preflow.h Thu Apr 29 08:42:05 2004 +0000
2.2 +++ b/src/work/jacint/preflow.h Thu Apr 29 09:08:14 2004 +0000
2.3 @@ -62,7 +62,7 @@
2.4 const Graph& G;
2.5 Node s;
2.6 Node t;
2.7 - CapMap* capacity;
2.8 + const CapMap* capacity;
2.9 FlowMap* flow;
2.10 int n; //the number of nodes of G
2.11 typename Graph::template NodeMap<int> level;
2.12 @@ -77,7 +77,7 @@
2.13 PREFLOW=2
2.14 };
2.15
2.16 - Preflow(Graph& _G, Node _s, Node _t, CapMap& _capacity,
2.17 + Preflow(const Graph& _G, Node _s, Node _t, const CapMap& _capacity,
2.18 FlowMap& _flow) :
2.19 G(_G), s(_s), t(_t), capacity(&_capacity),
2.20 flow(&_flow), n(_G.nodeNum()), level(_G), excess(_G,0) {}
2.21 @@ -153,6 +153,10 @@
2.22
2.23 break;
2.24 }
2.25 +// default:
2.26 +// break;
2.27 +// ZERO_FLOW ize kell
2.28 +
2.29 }
2.30
2.31 preflowPreproc( fe, active, level_list, left, right );
3.1 --- a/src/work/marci/bipartite_matching_try.cc Thu Apr 29 08:42:05 2004 +0000
3.2 +++ b/src/work/marci/bipartite_matching_try.cc Thu Apr 29 09:08:14 2004 +0000
3.3 @@ -181,7 +181,7 @@
3.4 ts.reset();
3.5 stGW::EdgeMap<int> pre_flow(stgw);
3.6 Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
3.7 - pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow, true);
3.8 + pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow/*, true*/);
3.9 pre_flow_test.run();
3.10 std::cout << "pre flow value: " << max_flow_test.flowValue() << std::endl;
3.11 std::cout << "elapsed time: " << ts << std::endl;
4.1 --- a/src/work/marci/edmonds_karp_demo.cc Thu Apr 29 08:42:05 2004 +0000
4.2 +++ b/src/work/marci/edmonds_karp_demo.cc Thu Apr 29 09:08:14 2004 +0000
4.3 @@ -71,11 +71,11 @@
4.4 Timer ts;
4.5 Graph::EdgeMap<int> flow(G); //0 flow
4.6 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
4.7 - pre_flow_test(G, s, t, cap, flow, true);
4.8 + pre_flow_test(G, s, t, cap, flow/*, true*/);
4.9 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
4.10 - pre_flow_ize(G, s, t, cap, flow, false);
4.11 - PreflowRes<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
4.12 - pre_flow_res(G, s, t, cap, flow, true);
4.13 + pre_flow_ize(G, s, t, cap, flow/*, false*/);
4.14 +// PreflowRes<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
4.15 +// pre_flow_res(G, s, t, cap, flow/*, true*/);
4.16 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
4.17 max_flow_test(G, s, t, cap, flow);
4.18
4.19 @@ -91,19 +91,19 @@
4.20 std::cout << "preflow ..." << std::endl;
4.21 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
4.22 ts.reset();
4.23 - pre_flow_ize.run();
4.24 + pre_flow_ize.preflow(Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::GEN_FLOW);
4.25 std::cout << "elapsed time: " << ts << std::endl;
4.26 std::cout << "flow value: "<< pre_flow_ize.flowValue() << std::endl;
4.27 }
4.28
4.29 - {
4.30 - std::cout << "wrapped preflow ..." << std::endl;
4.31 - FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
4.32 - ts.reset();
4.33 - pre_flow_res.run();
4.34 - std::cout << "elapsed time: " << ts << std::endl;
4.35 - std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl;
4.36 - }
4.37 +// {
4.38 +// std::cout << "wrapped preflow ..." << std::endl;
4.39 +// FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
4.40 +// ts.reset();
4.41 +// pre_flow_res.run();
4.42 +// std::cout << "elapsed time: " << ts << std::endl;
4.43 +// std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl;
4.44 +// }
4.45
4.46 {
4.47 std::cout << "physical blocking flow augmentation ..." << std::endl;
5.1 --- a/src/work/marci/lg_vs_sg.cc Thu Apr 29 08:42:05 2004 +0000
5.2 +++ b/src/work/marci/lg_vs_sg.cc Thu Apr 29 09:08:14 2004 +0000
5.3 @@ -35,7 +35,7 @@
5.4 Timer ts;
5.5 Graph::EdgeMap<int> flow(G); //0 flow
5.6 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
5.7 - pre_flow_test(G, s, t, cap, flow, true);
5.8 + pre_flow_test(G, s, t, cap, flow/*, true*/);
5.9 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
5.10 max_flow_test(G, s, t, cap, flow);
5.11
5.12 @@ -109,7 +109,7 @@
5.13 Timer ts;
5.14 Graph::EdgeMap<int> flow(G); //0 flow
5.15 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
5.16 - pre_flow_test(G, s, t, cap, flow, true);
5.17 + pre_flow_test(G, s, t, cap, flow/*, true*/);
5.18 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
5.19 max_flow_test(G, s, t, cap, flow);
5.20