- Modifications to compile with *both* gcc-3.3 and gcc-3.4
authoralpar
Mon, 04 Apr 2005 08:03:43 +0000
changeset 129502a403c305b9
parent 1294 2dec219d9ca2
child 1296 12078ddcf065
- Modifications to compile with *both* gcc-3.3 and gcc-3.4
- Adjust further SolutionType
src/work/athos/lp/Makefile
src/work/athos/lp/lp_base.h
src/work/athos/lp/lp_test.cc
     1.1 --- a/src/work/athos/lp/Makefile	Sun Apr 03 10:20:49 2005 +0000
     1.2 +++ b/src/work/athos/lp/Makefile	Mon Apr 04 08:03:43 2005 +0000
     1.3 @@ -14,4 +14,4 @@
     1.4  		lin_expr.h
     1.5  
     1.6  lp_test: lp_test.o lp_base.o lp_solver_skeleton.o lp_glpk.o
     1.7 -	g++ -o $@ $^ -lglpk
     1.8 \ No newline at end of file
     1.9 +	$(CXX) -o $@ $^ -lglpk
    1.10 \ No newline at end of file
     2.1 --- a/src/work/athos/lp/lp_base.h	Sun Apr 03 10:20:49 2005 +0000
     2.2 +++ b/src/work/athos/lp/lp_base.h	Mon Apr 04 08:03:43 2005 +0000
     2.3 @@ -114,14 +114,22 @@
     2.4        
     2.5      ///\e
     2.6      enum SolutionType {
     2.7 -      ///\e
     2.8 +      ///Feasible solution has'n been found (but may exist).
     2.9 +
    2.10 +      ///\todo NOTFOUND might be a better name.
    2.11 +      ///
    2.12        UNDEFINED = 0,
    2.13 -      ///\e
    2.14 +      ///The problem has no feasible solution
    2.15        INFEASIBLE = 1,
    2.16 -      ///\e
    2.17 +      ///Feasible solution found
    2.18        FEASIBLE = 2,
    2.19 -      ///\e
    2.20 -      OPTIMAL = 3
    2.21 +      ///Optimal solution exists and found
    2.22 +      OPTIMAL = 3,
    2.23 +      ///The cost function is unbounded
    2.24 +
    2.25 +      ///\todo Give a feasible solution and an infinite ray (and the
    2.26 +      ///corresponding bases)
    2.27 +      INFINITE = 4
    2.28      };
    2.29        
    2.30      ///The floating point type used by the solver
    2.31 @@ -351,9 +359,15 @@
    2.32        ///\e
    2.33        const Value &upperBound() const { return _ub; }
    2.34        ///\e
    2.35 -      bool lowerBounded() const { return std::isfinite(_lb); }
    2.36 +      bool lowerBounded() const { 
    2.37 +	using namespace std;
    2.38 +	return isfinite(_lb);
    2.39 +      }
    2.40        ///\e
    2.41 -      bool upperBounded() const { return std::isfinite(_ub); }
    2.42 +      bool upperBounded() const {
    2.43 +	using namespace std;
    2.44 +	return isfinite(_ub);
    2.45 +      }
    2.46      };
    2.47      
    2.48  
     3.1 --- a/src/work/athos/lp/lp_test.cc	Sun Apr 03 10:20:49 2005 +0000
     3.2 +++ b/src/work/athos/lp/lp_test.cc	Mon Apr 04 08:03:43 2005 +0000
     3.3 @@ -139,7 +139,7 @@
     3.4    typedef typename G::OutEdgeIt OutEdgeIt;
     3.5    typedef typename G::InEdgeIt InEdgeIt;
     3.6    
     3.7 -  typename G::EdgeMap<LpGlpk::Col> x(g);
     3.8 +  typename G::template EdgeMap<LpGlpk::Col> x(g);
     3.9    lp.addColSet(x);
    3.10    
    3.11    for(EdgeIt e(g);e!=INVALID;++e) {