diff -r 63d293ff1bef -r ab368e0ab662 lemon/mip_glpk.cc --- a/lemon/mip_glpk.cc Mon Jul 17 09:31:41 2006 +0000 +++ b/lemon/mip_glpk.cc Mon Jul 17 11:56:17 2006 +0000 @@ -29,20 +29,30 @@ MipGlpk::MipGlpk() { lpx_set_class(lp,LPX_MIP); } - - void MipGlpk::_integer(int i, bool enable){ - if(enable){ - lpx_set_col_kind(lp,i,LPX_IV); - }else{ - lpx_set_col_kind(lp,i,LPX_CV); + + void MipGlpk::_colType(int i, ColTypes col_type){ + switch (col_type){ + case INTEGER: + lpx_set_col_kind(lp,i,LPX_IV); + break; + case REAL: + lpx_set_col_kind(lp,i,LPX_CV); + break; + default: + //FIXME problem } } - bool MipGlpk::_integer(int i){ - if(LPX_IV == lpx_get_col_kind(lp,i)){ - return true; + ColTypes MipGlpk::_colType(int i){ + switch (lpx_get_col_kind(lp,i)){ + case LPX_IV: + return INTEGER;//Or binary + case LPX_CV: + return REAL; + default: + return REAL;//Error! } - return false; + } LpGlpk::SolveExitStatus MipGlpk::_solve(){