# HG changeset patch # User Alpar Juttner # Date 1352308207 -3600 # Node ID b78a46fe8002e1b8af9bec95602fb3e3d0cfa16c # Parent 8d2e55fac7520c9b6e65ff6b5c263cec3c612661# Parent c5990f454032cfd31db5d95262a48bb626e137bb Merge bugfix #440 to branch 1.1 diff -r 8d2e55fac752 -r b78a46fe8002 tools/dimacs-solver.cc --- a/tools/dimacs-solver.cc Thu Sep 13 11:52:50 2012 +0200 +++ b/tools/dimacs-solver.cc Wed Nov 07 18:10:07 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.totalCost() << '\n'; } } @@ -186,9 +187,6 @@ } int main(int argc, const char *argv[]) { - typedef SmartDigraph Digraph; - - typedef Digraph::Arc Arc; std::string inputName; std::string outputName;