# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1352362061 -3600
# Node ID 764826c6e2b451f09cfa6e588a3de005bc308154
# Parent  d59484d5fc1f9ff1d52a792bb3b99a1d455f41cb# Parent  c5990f454032cfd31db5d95262a48bb626e137bb
Merge bugfix #440

diff -r d59484d5fc1f -r 764826c6e2b4 tools/dimacs-solver.cc
--- a/tools/dimacs-solver.cc	Wed Nov 07 17:39:39 2012 +0100
+++ b/tools/dimacs-solver.cc	Thu Nov 08 09:07:41 2012 +0100
@@ -117,16 +117,17 @@
   }
   if (report) std::cerr << "Read the file: " << ti << '\n';
 
+  typedef NetworkSimplex<Digraph, Value> MCF;
   ti.restart();
-  NetworkSimplex<Digraph, Value> 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<LargeValue>() << '\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;