[Lemon-commits] Peter Kovacs: Small improvements in DIMACS solve...

Lemon HG hg at lemon.cs.elte.hu
Tue Feb 24 07:37:27 CET 2009


details:   http://lemon.cs.elte.hu/hg/lemon/rev/997a75bac45a
changeset: 551:997a75bac45a
user:      Peter Kovacs <kpeter [at] inf.elte.hu>
date:      Mon Feb 23 14:51:10 2009 +0100
description:
	Small improvements in DIMACS solver (#226)

diffstat:

1 file changed, 5 insertions(+), 12 deletions(-)
tools/dimacs-solver.cc |   17 +++++------------

diffs (56 lines):

diff --git a/tools/dimacs-solver.cc b/tools/dimacs-solver.cc
--- a/tools/dimacs-solver.cc
+++ b/tools/dimacs-solver.cc
@@ -18,10 +18,9 @@
 
 ///\ingroup tools
 ///\file
-///\brief DIMACS to LGF converter.
+///\brief DIMACS problem solver.
 ///
-/// This program converts various DIMACS formats to the LEMON Digraph Format
-/// (LGF).
+/// This program solves various problems given in DIMACS format.
 ///
 /// See
 /// \verbatim
@@ -120,8 +119,7 @@
     {
     case DimacsDescriptor::MIN:
       std::cerr <<
-        "\n\n Sorry, the min. cost flow solver is not yet available.\n"
-                << std::endl;
+        "\n\n Sorry, the min. cost flow solver is not yet available.\n";
       break;
     case DimacsDescriptor::MAX:
       solve_max<Value>(ap,is,os,desc);
@@ -141,11 +139,6 @@
   typedef SmartDigraph Digraph;
 
   typedef Digraph::Arc Arc;
-  typedef Digraph::Node Node;
-  typedef Digraph::ArcIt ArcIt;
-  typedef Digraph::NodeIt NodeIt;
-  typedef Digraph::ArcMap<double> DoubleArcMap;
-  typedef Digraph::NodeMap<double> DoubleNodeMap;
 
   std::string inputName;
   std::string outputName;
@@ -188,7 +181,7 @@
     default:
       std::cerr << ap.commandName() << ": too many arguments\n";
       return 1;
-  }
+    }
   std::istream& is = (ap.files().size()<1 ? std::cin : input);
   std::ostream& os = (ap.files().size()<2 ? std::cout : output);
 
@@ -216,7 +209,7 @@
         }
       std::cout << "\nNum of nodes: " << desc.nodeNum;
       std::cout << "\nNum of arcs:  " << desc.edgeNum;
-      std::cout << '\n' << std::endl;
+      std::cout << "\n\n";
     }
     
   if(ap.given("double"))



More information about the Lemon-commits mailing list