src/work/marci/lp/max_flow_by_lp.cc
changeset 1030 c8a41699e613
parent 1017 f588efc6d607
child 1031 0b7169db694f
equal deleted inserted replaced
5:9c194343e823 6:1866759d5e13
    19 using namespace lemon;
    19 using namespace lemon;
    20 
    20 
    21 int main(int, char **) {
    21 int main(int, char **) {
    22 
    22 
    23   typedef ListGraph MutableGraph;
    23   typedef ListGraph MutableGraph;
    24   typedef SmartGraph Graph;
    24   typedef ListGraph Graph;
    25   typedef Graph::Node Node;
    25   typedef Graph::Node Node;
    26   typedef Graph::Edge Edge;
    26   typedef Graph::Edge Edge;
    27   typedef Graph::EdgeIt EdgeIt;
    27   typedef Graph::EdgeIt EdgeIt;
    28 
    28 
    29   Graph g;
    29   Graph g;
   176   typedef ConstMap<Edge, int> LCap;
   176   typedef ConstMap<Edge, int> LCap;
   177   LCap lcap(0);
   177   LCap lcap(0);
   178 
   178 
   179   MinCostGenFlow<Graph, int, Excess, LCap> 
   179   MinCostGenFlow<Graph, int, Excess, LCap> 
   180     min_cost(g, excess, lcap, cap, flow, cost); 
   180     min_cost(g, excess, lcap, cap, flow, cost); 
       
   181   min_cost.feasible();
   181   min_cost.run();
   182   min_cost.run();
   182 
   183 
   183   std::cout << "elapsed time: " << ts << std::endl;
   184   std::cout << "elapsed time: " << ts << std::endl;
   184   std::cout << "flow value: "<< flow[e] << std::endl;
   185   std::cout << "flow value: "<< flow[e] << std::endl;
   185 }
   186 }