LEMON_INTEGER -> INT
authorathos
Mon, 30 Oct 2006 11:32:19 +0000
changeset 22673575f17a6e7f
parent 2266 07b533060ec5
child 2268 ad15bdd334bf
LEMON_INTEGER -> INT
lemon/lp_base.h
lemon/mip_cplex.cc
lemon/mip_glpk.cc
test/mip_test.cc
     1.1 --- a/lemon/lp_base.h	Fri Oct 27 15:19:33 2006 +0000
     1.2 +++ b/lemon/lp_base.h	Mon Oct 30 11:32:19 2006 +0000
     1.3 @@ -1174,7 +1174,7 @@
     1.4  
     1.5        ///Unfortunately, cplex 7.5 somewhere writes something like
     1.6        ///#define INTEGER 'I'
     1.7 -      LEMON_INTEGER = 1
     1.8 +      INT = 1
     1.9        ///\todo No support for other types yet.
    1.10      };
    1.11  
    1.12 @@ -1197,7 +1197,7 @@
    1.13      ///Sets the type of the given Col to integer or remove that property.
    1.14      void integer(Col c, bool enable) {
    1.15        if (enable)
    1.16 -	colType(c,LEMON_INTEGER);
    1.17 +	colType(c,INT);
    1.18        else
    1.19  	colType(c,REAL);
    1.20      }
    1.21 @@ -1207,7 +1207,7 @@
    1.22      ///Gives back the type of the column.
    1.23      ///\return true if the column has integer type and false if not.
    1.24      bool integer(Col c){
    1.25 -      return (colType(c)==LEMON_INTEGER);
    1.26 +      return (colType(c)==INT);
    1.27      }
    1.28  
    1.29      /// The status of the MIP problem
     2.1 --- a/lemon/mip_cplex.cc	Fri Oct 27 15:19:33 2006 +0000
     2.2 +++ b/lemon/mip_cplex.cc	Mon Oct 30 11:32:19 2006 +0000
     2.3 @@ -46,7 +46,7 @@
     2.4      indices[0]=i;
     2.5      char ctype[1];
     2.6      switch (col_type){
     2.7 -      case LEMON_INTEGER:
     2.8 +      case INT:
     2.9  	ctype[0]=CPX_INTEGER;//'I'
    2.10  	break;
    2.11        case REAL:
    2.12 @@ -65,7 +65,7 @@
    2.13      switch (ctype[0]){
    2.14  
    2.15      case CPX_INTEGER:
    2.16 -      return LEMON_INTEGER;
    2.17 +      return INT;
    2.18      case CPX_CONTINUOUS:
    2.19        return REAL;
    2.20      default:
     3.1 --- a/lemon/mip_glpk.cc	Fri Oct 27 15:19:33 2006 +0000
     3.2 +++ b/lemon/mip_glpk.cc	Mon Oct 30 11:32:19 2006 +0000
     3.3 @@ -29,7 +29,7 @@
     3.4  
     3.5    void MipGlpk::_colType(int i, MipGlpk::ColTypes col_type){
     3.6      switch (col_type){
     3.7 -      case LEMON_INTEGER:
     3.8 +      case INT:
     3.9  	lpx_set_col_kind(lp,i,LPX_IV);
    3.10  	break;
    3.11        case REAL:
    3.12 @@ -43,7 +43,7 @@
    3.13    MipGlpk::ColTypes MipGlpk::_colType(int i){
    3.14      switch (lpx_get_col_kind(lp,i)){
    3.15      case LPX_IV:
    3.16 -      return LEMON_INTEGER;//Or binary
    3.17 +      return INT;//Or binary
    3.18      case LPX_CV:
    3.19        return REAL;
    3.20      default:
     4.1 --- a/test/mip_test.cc	Fri Oct 27 15:19:33 2006 +0000
     4.2 +++ b/test/mip_test.cc	Mon Oct 30 11:32:19 2006 +0000
     4.3 @@ -76,13 +76,13 @@
     4.4    solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);
     4.5  
     4.6    //Restrict x2 to integer
     4.7 -  mip.colType(x2,MipSolverBase::LEMON_INTEGER);  
     4.8 +  mip.colType(x2,MipSolverBase::INT);  
     4.9    expected_opt=1.0/2.0;
    4.10    solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);
    4.11  
    4.12  
    4.13    //Restrict both to integer
    4.14 -  mip.colType(x1,MipSolverBase::LEMON_INTEGER);  
    4.15 +  mip.colType(x1,MipSolverBase::INT);  
    4.16    expected_opt=0;
    4.17    solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);
    4.18