Merge bugfix #440
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 08 Nov 2012 09:07:41 +0100
changeset 1170764826c6e2b4
parent 1166 d59484d5fc1f
parent 1167 c5990f454032
child 1176 36fa2fee7144
child 1178 21a9f829ab68
Merge bugfix #440
tools/dimacs-solver.cc
     1.1 --- a/tools/dimacs-solver.cc	Wed Nov 07 17:39:39 2012 +0100
     1.2 +++ b/tools/dimacs-solver.cc	Thu Nov 08 09:07:41 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;