# HG changeset patch # User Alpar Juttner # Date 1352308406 -3600 # Node ID 774349a16ba0b46a2ce8cc3c2ef41ec89a7898f3 # Parent 08712a8c3afecd618014042cfb0c4c2677f24e7c# Parent c5990f454032cfd31db5d95262a48bb626e137bb Merge bugfix #440 to branch 1.2 diff -r 08712a8c3afe -r 774349a16ba0 tools/dimacs-solver.cc --- a/tools/dimacs-solver.cc Thu Sep 13 12:05:34 2012 +0200 +++ b/tools/dimacs-solver.cc Wed Nov 07 18:13:26 2012 +0100 @@ -117,16 +117,17 @@ } if (report) std::cerr << "Read the file: " << ti << '\n'; + typedef NetworkSimplex MCF; ti.restart(); - NetworkSimplex ns(g); + MCF ns(g); ns.lowerMap(lower).upperMap(cap).costMap(cost).supplyMap(sup); if (sum_sup > 0) ns.supplyType(ns.LEQ); if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n'; ti.restart(); - bool res = ns.run(); + typename MCF::ProblemType res = ns.run(); if (report) { std::cerr << "Run NetworkSimplex: " << ti << "\n\n"; - std::cerr << "Feasible flow: " << (res ? "found" : "not found") << '\n'; + std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : "not found") << '\n'; if (res) std::cerr << "Min flow cost: " << ns.template totalCost() << '\n'; } @@ -187,9 +188,6 @@ } int main(int argc, const char *argv[]) { - typedef SmartDigraph Digraph; - - typedef Digraph::Arc Arc; std::string inputName; std::string outputName;