# HG changeset patch # User marci # Date 1083347330 0 # Node ID 1a45623b47960beafa2a030b88118085a71480b1 # Parent 767f3da8ce0e572f2db07d76ba243ed2d5aec645 misc diff -r 767f3da8ce0e -r 1a45623b4796 src/work/marci/bipartite_graph_wrapper.h --- a/src/work/marci/bipartite_graph_wrapper.h Fri Apr 30 17:10:01 2004 +0000 +++ b/src/work/marci/bipartite_graph_wrapper.h Fri Apr 30 17:48:50 2004 +0000 @@ -46,8 +46,9 @@ bool T_CLASS; BipartiteGraphWrapper(Graph& _graph, SFalseTTrueMap& _s_false_t_true_map) - : GraphWrapper(_graph), s_false_t_true_map(&_s_false_t_true_map), - S_CLASS(false), T_CLASS(true) { } + : GraphWrapper(_graph), + s_false_t_true_map(&_s_false_t_true_map), + S_CLASS(false), T_CLASS(true) { } typedef typename GraphWrapper::Node Node; //using GraphWrapper::NodeIt; typedef typename GraphWrapper::Edge Edge; @@ -197,7 +198,7 @@ typedef typename Parent::Node Node; typedef typename Parent::Edge Edge; BipartiteGraph() : BipartiteGraphWrapper(), - gr(), bipartite_map(gr), + gr(), bipartite_map(gr, -1), s_false_t_true_map(bipartite_map) { Parent::setGraph(gr); Parent::setSFalseTTrueMap(s_false_t_true_map); diff -r 767f3da8ce0e -r 1a45623b4796 src/work/marci/bipartite_matching_try_2.cc --- a/src/work/marci/bipartite_matching_try_2.cc Fri Apr 30 17:10:01 2004 +0000 +++ b/src/work/marci/bipartite_matching_try_2.cc Fri Apr 30 17:48:50 2004 +0000 @@ -63,7 +63,7 @@ std::cout << "number of edges="; std::cin >> m; - + std::cout << "Generatig a random bipartite graph..." << std::endl; for (int i=0; i stGW; stGW stgw(g); ConstMap const1map(1); - - - Timer ts; ts.reset(); stGW::EdgeMap flow(stgw); MaxFlow, stGW::EdgeMap > max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow); + max_flow_test.run(); // while (max_flow_test.augmentOnShortestPath()) { } - typedef ListGraph MutableGraph; +// typedef ListGraph MutableGraph; // while (max_flow_test.augmentOnBlockingFlow1()) { - while (max_flow_test.augmentOnBlockingFlow2()) { - std::cout << max_flow_test.flowValue() << std::endl; - } +// while (max_flow_test.augmentOnBlockingFlow2()) { +// std::cout << max_flow_test.flowValue() << std::endl; +// } std::cout << "max flow value: " << max_flow_test.flowValue() << std::endl; std::cout << "elapsed time: " << ts << std::endl; FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { @@ -101,17 +121,5 @@ } std::cout << std::endl; - ts.reset(); - stGW::EdgeMap pre_flow(stgw); - MaxFlow, stGW::EdgeMap > - pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow/*, true*/); - pre_flow_test.run(); - std::cout << "pre flow value: " << max_flow_test.flowValue() << std::endl; - std::cout << "elapsed time: " << ts << std::endl; -// FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { -// std::cout << e << ": " << pre_flow[e] << "\n"; -// } -// std::cout << "\n"; - return 0; }