COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/dimacs-solver.cc

    r1169 r956  
    118118  if (report) std::cerr << "Read the file: " << ti << '\n';
    119119
    120   typedef NetworkSimplex<Digraph, Value> MCF;
    121   ti.restart();
    122   MCF ns(g);
     120  ti.restart();
     121  NetworkSimplex<Digraph, Value> ns(g);
    123122  ns.lowerMap(lower).upperMap(cap).costMap(cost).supplyMap(sup);
    124123  if (sum_sup > 0) ns.supplyType(ns.LEQ);
    125124  if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n';
    126125  ti.restart();
    127   typename MCF::ProblemType res = ns.run();
     126  bool res = ns.run();
    128127  if (report) {
    129128    std::cerr << "Run NetworkSimplex: " << ti << "\n\n";
    130     std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : "not found") << '\n';
     129    std::cerr << "Feasible flow: " << (res ? "found" : "not found") << '\n';
    131130    if (res) std::cerr << "Min flow cost: "
    132131                       << ns.template totalCost<LargeValue>() << '\n';
     
    189188
    190189int main(int argc, const char *argv[]) {
     190  typedef SmartDigraph Digraph;
     191
     192  typedef Digraph::Arc Arc;
    191193
    192194  std::string inputName;
Note: See TracChangeset for help on using the changeset viewer.