# HG changeset patch # User athos # Date 1162207939 0 # Node ID 3575f17a6e7fa827ee6164e97db2c77ebc30b6c9 # Parent 07b533060ec57521adbee1556619a834633bf946 LEMON_INTEGER -> INT diff -r 07b533060ec5 -r 3575f17a6e7f lemon/lp_base.h --- a/lemon/lp_base.h Fri Oct 27 15:19:33 2006 +0000 +++ b/lemon/lp_base.h Mon Oct 30 11:32:19 2006 +0000 @@ -1174,7 +1174,7 @@ ///Unfortunately, cplex 7.5 somewhere writes something like ///#define INTEGER 'I' - LEMON_INTEGER = 1 + INT = 1 ///\todo No support for other types yet. }; @@ -1197,7 +1197,7 @@ ///Sets the type of the given Col to integer or remove that property. void integer(Col c, bool enable) { if (enable) - colType(c,LEMON_INTEGER); + colType(c,INT); else colType(c,REAL); } @@ -1207,7 +1207,7 @@ ///Gives back the type of the column. ///\return true if the column has integer type and false if not. bool integer(Col c){ - return (colType(c)==LEMON_INTEGER); + return (colType(c)==INT); } /// The status of the MIP problem diff -r 07b533060ec5 -r 3575f17a6e7f lemon/mip_cplex.cc --- a/lemon/mip_cplex.cc Fri Oct 27 15:19:33 2006 +0000 +++ b/lemon/mip_cplex.cc Mon Oct 30 11:32:19 2006 +0000 @@ -46,7 +46,7 @@ indices[0]=i; char ctype[1]; switch (col_type){ - case LEMON_INTEGER: + case INT: ctype[0]=CPX_INTEGER;//'I' break; case REAL: @@ -65,7 +65,7 @@ switch (ctype[0]){ case CPX_INTEGER: - return LEMON_INTEGER; + return INT; case CPX_CONTINUOUS: return REAL; default: diff -r 07b533060ec5 -r 3575f17a6e7f lemon/mip_glpk.cc --- a/lemon/mip_glpk.cc Fri Oct 27 15:19:33 2006 +0000 +++ b/lemon/mip_glpk.cc Mon Oct 30 11:32:19 2006 +0000 @@ -29,7 +29,7 @@ void MipGlpk::_colType(int i, MipGlpk::ColTypes col_type){ switch (col_type){ - case LEMON_INTEGER: + case INT: lpx_set_col_kind(lp,i,LPX_IV); break; case REAL: @@ -43,7 +43,7 @@ MipGlpk::ColTypes MipGlpk::_colType(int i){ switch (lpx_get_col_kind(lp,i)){ case LPX_IV: - return LEMON_INTEGER;//Or binary + return INT;//Or binary case LPX_CV: return REAL; default: diff -r 07b533060ec5 -r 3575f17a6e7f test/mip_test.cc --- a/test/mip_test.cc Fri Oct 27 15:19:33 2006 +0000 +++ b/test/mip_test.cc Mon Oct 30 11:32:19 2006 +0000 @@ -76,13 +76,13 @@ solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); //Restrict x2 to integer - mip.colType(x2,MipSolverBase::LEMON_INTEGER); + mip.colType(x2,MipSolverBase::INT); expected_opt=1.0/2.0; solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); //Restrict both to integer - mip.colType(x1,MipSolverBase::LEMON_INTEGER); + mip.colType(x1,MipSolverBase::INT); expected_opt=0; solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);