equal
deleted
inserted
replaced
12 #include <lemon/preflow.h> |
12 #include <lemon/preflow.h> |
13 #include <lemon/min_cost_flow.h> |
13 #include <lemon/min_cost_flow.h> |
14 //#include <augmenting_flow.h> |
14 //#include <augmenting_flow.h> |
15 //#include <preflow_res.h> |
15 //#include <preflow_res.h> |
16 #include <work/marci/merge_node_graph_wrapper.h> |
16 #include <work/marci/merge_node_graph_wrapper.h> |
17 #include <work/marci/lp/lp_solver_wrapper.h> |
17 #include <work/marci/lp/lp_solver_wrapper_2.h> |
18 |
18 |
19 namespace lemon { |
19 namespace lemon { |
20 |
20 |
21 template<typename Edge, typename EdgeIndexMap> |
21 template<typename Edge, typename EdgeIndexMap> |
22 class PrimalMap { |
22 class PrimalMap { |
209 min_cost_flow.getFlow()[ewww]); |
209 min_cost_flow.getFlow()[ewww]); |
210 } |
210 } |
211 return (expected>=min_cost_flow.flowValue()); |
211 return (expected>=min_cost_flow.flowValue()); |
212 } |
212 } |
213 void runByLP() { |
213 void runByLP() { |
214 LPSolverWrapper lp; |
214 typedef LPSolverWrapper LPSolver; |
|
215 LPSolver lp; |
215 lp.setMinimize(); |
216 lp.setMinimize(); |
216 typedef LPSolverWrapper::ColIt ColIt; |
217 typedef LPSolver::ColIt ColIt; |
217 typedef LPSolverWrapper::RowIt RowIt; |
218 typedef LPSolver::RowIt RowIt; |
218 typedef typename Graph::template EdgeMap<ColIt> EdgeIndexMap; |
219 typedef typename Graph::template EdgeMap<ColIt> EdgeIndexMap; |
219 EdgeIndexMap edge_index_map(g); |
220 EdgeIndexMap edge_index_map(g); |
220 PrimalMap<typename Graph::Edge, EdgeIndexMap> lp_flow(lp, edge_index_map); |
221 PrimalMap<typename Graph::Edge, EdgeIndexMap> lp_flow(lp, edge_index_map); |
221 for (typename Graph::EdgeIt e(g); e!=INVALID; ++e) { |
222 for (typename Graph::EdgeIt e(g); e!=INVALID; ++e) { |
222 ColIt col_it=lp.addCol(); |
223 ColIt col_it=lp.addCol(); |