diff -r 8de0c1aeeb32 -r bfbb5b30c5b8 src/lemon/lp_glpk.cc --- a/src/lemon/lp_glpk.cc Wed Apr 20 14:29:23 2005 +0000 +++ b/src/lemon/lp_glpk.cc Wed Apr 20 15:06:42 2005 +0000 @@ -267,22 +267,28 @@ lpx_set_obj_coef(lp, i, obj_coef); } - void LpGlpk::_setObj(int length, - int const * indices, - Value const * values ) + void LpGlpk::_clearObj() { - Value new_values[1+lpx_num_cols()]; - for (i=0;i<=lpx_num_cols();++i){ - new_values[i]=0; - } - for (i=1;i<=length;++i){ - new_values[indices[i]]=values[i]; - } - - for (i=0;i<=lpx_num_cols();++i){ - lpx_set_obj_coef(lp, i, new_values[i]); + for (int i=0;i<=lpx_get_num_cols(lp);++i){ + lpx_set_obj_coef(lp, i, 0); } } +// void LpGlpk::_setObj(int length, +// int const * indices, +// Value const * values ) +// { +// Value new_values[1+lpx_num_cols()]; +// for (i=0;i<=lpx_num_cols();++i){ +// new_values[i]=0; +// } +// for (i=1;i<=length;++i){ +// new_values[indices[i]]=values[i]; +// } + +// for (i=0;i<=lpx_num_cols();++i){ +// lpx_set_obj_coef(lp, i, new_values[i]); +// } +// } LpGlpk::SolveExitStatus LpGlpk::_solve() {