[Lemon-commits] [lemon_svn] alpar: r1729 - hugo/trunk/src/work/athos/lp

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:47:13 CET 2006


Author: alpar
Date: Mon Apr  4 10:03:43 2005
New Revision: 1729

Modified:
   hugo/trunk/src/work/athos/lp/Makefile
   hugo/trunk/src/work/athos/lp/lp_base.h
   hugo/trunk/src/work/athos/lp/lp_test.cc

Log:
- Modifications to compile with *both* gcc-3.3 and gcc-3.4
- Adjust further SolutionType

Modified: hugo/trunk/src/work/athos/lp/Makefile
==============================================================================
--- hugo/trunk/src/work/athos/lp/Makefile	(original)
+++ hugo/trunk/src/work/athos/lp/Makefile	Mon Apr  4 10:03:43 2005
@@ -14,4 +14,4 @@
 		lin_expr.h
 
 lp_test: lp_test.o lp_base.o lp_solver_skeleton.o lp_glpk.o
-	g++ -o $@ $^ -lglpk
\ No newline at end of file
+	$(CXX) -o $@ $^ -lglpk
\ No newline at end of file

Modified: hugo/trunk/src/work/athos/lp/lp_base.h
==============================================================================
--- hugo/trunk/src/work/athos/lp/lp_base.h	(original)
+++ hugo/trunk/src/work/athos/lp/lp_base.h	Mon Apr  4 10:03:43 2005
@@ -114,14 +114,22 @@
       
     ///\e
     enum SolutionType {
-      ///\e
+      ///Feasible solution has'n been found (but may exist).
+
+      ///\todo NOTFOUND might be a better name.
+      ///
       UNDEFINED = 0,
-      ///\e
+      ///The problem has no feasible solution
       INFEASIBLE = 1,
-      ///\e
+      ///Feasible solution found
       FEASIBLE = 2,
-      ///\e
-      OPTIMAL = 3
+      ///Optimal solution exists and found
+      OPTIMAL = 3,
+      ///The cost function is unbounded
+
+      ///\todo Give a feasible solution and an infinite ray (and the
+      ///corresponding bases)
+      INFINITE = 4
     };
       
     ///The floating point type used by the solver
@@ -351,9 +359,15 @@
       ///\e
       const Value &upperBound() const { return _ub; }
       ///\e
-      bool lowerBounded() const { return std::isfinite(_lb); }
+      bool lowerBounded() const { 
+	using namespace std;
+	return isfinite(_lb);
+      }
       ///\e
-      bool upperBounded() const { return std::isfinite(_ub); }
+      bool upperBounded() const {
+	using namespace std;
+	return isfinite(_ub);
+      }
     };
     
 

Modified: hugo/trunk/src/work/athos/lp/lp_test.cc
==============================================================================
--- hugo/trunk/src/work/athos/lp/lp_test.cc	(original)
+++ hugo/trunk/src/work/athos/lp/lp_test.cc	Mon Apr  4 10:03:43 2005
@@ -139,7 +139,7 @@
   typedef typename G::OutEdgeIt OutEdgeIt;
   typedef typename G::InEdgeIt InEdgeIt;
   
-  typename G::EdgeMap<LpGlpk::Col> x(g);
+  typename G::template EdgeMap<LpGlpk::Col> x(g);
   lp.addColSet(x);
   
   for(EdgeIt e(g);e!=INVALID;++e) {



More information about the Lemon-commits mailing list