Small improvements in DIMACS solver (#226)
authorPeter Kovacs <kpeter@inf.elte.hu>
Mon, 23 Feb 2009 14:51:10 +0100
changeset 579997a75bac45a
parent 577 1c5d6e47921f
child 580 6643fc6dafc1
Small improvements in DIMACS solver (#226)
tools/dimacs-solver.cc
     1.1 --- a/tools/dimacs-solver.cc	Mon Feb 23 12:33:40 2009 +0000
     1.2 +++ b/tools/dimacs-solver.cc	Mon Feb 23 14:51:10 2009 +0100
     1.3 @@ -18,10 +18,9 @@
     1.4  
     1.5  ///\ingroup tools
     1.6  ///\file
     1.7 -///\brief DIMACS to LGF converter.
     1.8 +///\brief DIMACS problem solver.
     1.9  ///
    1.10 -/// This program converts various DIMACS formats to the LEMON Digraph Format
    1.11 -/// (LGF).
    1.12 +/// This program solves various problems given in DIMACS format.
    1.13  ///
    1.14  /// See
    1.15  /// \verbatim
    1.16 @@ -120,8 +119,7 @@
    1.17      {
    1.18      case DimacsDescriptor::MIN:
    1.19        std::cerr <<
    1.20 -        "\n\n Sorry, the min. cost flow solver is not yet available.\n"
    1.21 -                << std::endl;
    1.22 +        "\n\n Sorry, the min. cost flow solver is not yet available.\n";
    1.23        break;
    1.24      case DimacsDescriptor::MAX:
    1.25        solve_max<Value>(ap,is,os,desc);
    1.26 @@ -141,11 +139,6 @@
    1.27    typedef SmartDigraph Digraph;
    1.28  
    1.29    typedef Digraph::Arc Arc;
    1.30 -  typedef Digraph::Node Node;
    1.31 -  typedef Digraph::ArcIt ArcIt;
    1.32 -  typedef Digraph::NodeIt NodeIt;
    1.33 -  typedef Digraph::ArcMap<double> DoubleArcMap;
    1.34 -  typedef Digraph::NodeMap<double> DoubleNodeMap;
    1.35  
    1.36    std::string inputName;
    1.37    std::string outputName;
    1.38 @@ -188,7 +181,7 @@
    1.39      default:
    1.40        std::cerr << ap.commandName() << ": too many arguments\n";
    1.41        return 1;
    1.42 -  }
    1.43 +    }
    1.44    std::istream& is = (ap.files().size()<1 ? std::cin : input);
    1.45    std::ostream& os = (ap.files().size()<2 ? std::cout : output);
    1.46  
    1.47 @@ -216,7 +209,7 @@
    1.48          }
    1.49        std::cout << "\nNum of nodes: " << desc.nodeNum;
    1.50        std::cout << "\nNum of arcs:  " << desc.edgeNum;
    1.51 -      std::cout << '\n' << std::endl;
    1.52 +      std::cout << "\n\n";
    1.53      }
    1.54      
    1.55    if(ap.given("double"))