1.1 --- a/src/work/athos/lp/lp_solver_glpk.h Tue Mar 22 16:00:00 2005 +0000
1.2 +++ b/src/work/athos/lp/lp_solver_glpk.h Tue Mar 22 16:49:30 2005 +0000
1.3 @@ -164,7 +164,35 @@
1.4 lpx_del_rows(lp, 1, rows);
1.5 }
1.6 void _setCoeff(int col, int row, double value) {
1.7 - /// FIXME not yet implemented
1.8 + ///FIXME Of course this is not efficient at all, but GLPK knows not more.
1.9 + int change_this;
1.10 + bool get_set_row;
1.11 + //The only thing we can do is optimize on whether working with a row
1.12 + //or a coloumn
1.13 + int row_num = rowNum();
1.14 + int col_num = colNum();
1.15 + if (col_num<row_num){
1.16 + //There are more rows than coloumns
1.17 + get_set_row=true;
1.18 + int mem_length=1+row_num;
1.19 + int* indices = new int[mem_length];
1.20 + double* doubles = new double[mem_length];
1.21 + int length=lpx_get_mat_col(lp, i, indices, doubles);
1.22 + }else{
1.23 + get_set_row=false;
1.24 + int mem_length=1+col_num;
1.25 + int* indices = new int[mem_length];
1.26 + double* doubles = new double[mem_length];
1.27 + int length=lpx_get_mat_row(lp, i, indices, doubles);
1.28 + }
1.29 + //Itten
1.30 +int* indices = new int[mem_length];
1.31 + double* doubles = new double[mem_length];
1.32 + int length=lpx_get_mat_col(lp, i, indices, doubles);
1.33 +
1.34 + delete [] indices;
1.35 + delete [] doubles;
1.36 +
1.37 }
1.38 double _getCoeff(int col, int row) {
1.39 /// FIXME not yet implemented