1.1 --- a/src/lemon/lp_glpk.cc Wed Apr 20 14:29:23 2005 +0000
1.2 +++ b/src/lemon/lp_glpk.cc Wed Apr 20 15:06:42 2005 +0000
1.3 @@ -267,22 +267,28 @@
1.4 lpx_set_obj_coef(lp, i, obj_coef);
1.5 }
1.6
1.7 - void LpGlpk::_setObj(int length,
1.8 - int const * indices,
1.9 - Value const * values )
1.10 + void LpGlpk::_clearObj()
1.11 {
1.12 - Value new_values[1+lpx_num_cols()];
1.13 - for (i=0;i<=lpx_num_cols();++i){
1.14 - new_values[i]=0;
1.15 - }
1.16 - for (i=1;i<=length;++i){
1.17 - new_values[indices[i]]=values[i];
1.18 - }
1.19 -
1.20 - for (i=0;i<=lpx_num_cols();++i){
1.21 - lpx_set_obj_coef(lp, i, new_values[i]);
1.22 + for (int i=0;i<=lpx_get_num_cols(lp);++i){
1.23 + lpx_set_obj_coef(lp, i, 0);
1.24 }
1.25 }
1.26 +// void LpGlpk::_setObj(int length,
1.27 +// int const * indices,
1.28 +// Value const * values )
1.29 +// {
1.30 +// Value new_values[1+lpx_num_cols()];
1.31 +// for (i=0;i<=lpx_num_cols();++i){
1.32 +// new_values[i]=0;
1.33 +// }
1.34 +// for (i=1;i<=length;++i){
1.35 +// new_values[indices[i]]=values[i];
1.36 +// }
1.37 +
1.38 +// for (i=0;i<=lpx_num_cols();++i){
1.39 +// lpx_set_obj_coef(lp, i, new_values[i]);
1.40 +// }
1.41 +// }
1.42
1.43 LpGlpk::SolveExitStatus LpGlpk::_solve()
1.44 {