tools/dimacs-solver.cc
branch1.1
changeset 795 b78a46fe8002
parent 761 f1398882a928
parent 794 c5990f454032
     1.1 --- a/tools/dimacs-solver.cc	Thu Sep 13 11:52:50 2012 +0200
     1.2 +++ b/tools/dimacs-solver.cc	Wed Nov 07 18:10:07 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: " << ns.totalCost() << '\n';
    1.22    }
    1.23  }
    1.24 @@ -186,9 +187,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;