equal
deleted
inserted
replaced
103 Timer ti; |
103 Timer ti; |
104 ti.restart(); |
104 ti.restart(); |
105 readDimacsMin(is, g, lower, cap, cost, sup, desc); |
105 readDimacsMin(is, g, lower, cap, cost, sup, desc); |
106 if (report) std::cerr << "Read the file: " << ti << '\n'; |
106 if (report) std::cerr << "Read the file: " << ti << '\n'; |
107 ti.restart(); |
107 ti.restart(); |
108 NetworkSimplex< Digraph, Digraph::ArcMap<Value>, Digraph::ArcMap<Value>, |
108 NetworkSimplex<Digraph, Value> ns(g); |
109 Digraph::ArcMap<Value>, Digraph::NodeMap<Value> > |
109 ns.lowerMap(lower).capacityMap(cap).costMap(cost).supplyMap(sup); |
110 ns(g, lower, cap, cost, sup); |
|
111 if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n'; |
110 if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n'; |
112 ti.restart(); |
111 ti.restart(); |
113 ns.run(); |
112 ns.run(); |
114 if (report) std::cerr << "Run NetworkSimplex: " << ti << '\n'; |
113 if (report) std::cerr << "Run NetworkSimplex: " << ti << '\n'; |
115 if (report) std::cerr << "\nMin flow cost: " << ns.totalCost() << '\n'; |
114 if (report) std::cerr << "\nMin flow cost: " << ns.totalCost() << '\n'; |