Merge bugfix #440 to branch 1.2 1.2
authorAlpar Juttner <alpar@cs.elte.hu>
Wed, 07 Nov 2012 18:13:26 +0100
branch1.2
changeset 968774349a16ba0
parent 966 08712a8c3afe
parent 967 c5990f454032
child 972 1fe3b4ad8caa
Merge bugfix #440 to branch 1.2
tools/dimacs-solver.cc
     1.1 --- a/tools/dimacs-solver.cc	Thu Sep 13 12:05:34 2012 +0200
     1.2 +++ b/tools/dimacs-solver.cc	Wed Nov 07 18:13:26 2012 +0100
     1.3 @@ -117,16 +117,17 @@
     1.4    }
     1.5    if (report) std::cerr << "Read the file: " << ti << '\n';
     1.6  
     1.7 +  typedef NetworkSimplex<Digraph, Value> MCF;
     1.8    ti.restart();
     1.9 -  NetworkSimplex<Digraph, Value> ns(g);
    1.10 +  MCF ns(g);
    1.11    ns.lowerMap(lower).upperMap(cap).costMap(cost).supplyMap(sup);
    1.12    if (sum_sup > 0) ns.supplyType(ns.LEQ);
    1.13    if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n';
    1.14    ti.restart();
    1.15 -  bool res = ns.run();
    1.16 +  typename MCF::ProblemType res = ns.run();
    1.17    if (report) {
    1.18      std::cerr << "Run NetworkSimplex: " << ti << "\n\n";
    1.19 -    std::cerr << "Feasible flow: " << (res ? "found" : "not found") << '\n';
    1.20 +    std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : "not found") << '\n';
    1.21      if (res) std::cerr << "Min flow cost: "
    1.22                         << ns.template totalCost<LargeValue>() << '\n';
    1.23    }
    1.24 @@ -187,9 +188,6 @@
    1.25  }
    1.26  
    1.27  int main(int argc, const char *argv[]) {
    1.28 -  typedef SmartDigraph Digraph;
    1.29 -
    1.30 -  typedef Digraph::Arc Arc;
    1.31  
    1.32    std::string inputName;
    1.33    std::string outputName;