Changeset 1243:41caee260bd4 in lemon-0.x for src/work/athos/lp/lp_solver_glpk.h
- Timestamp:
- 03/22/05 17:49:30 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1670
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/athos/lp/lp_solver_glpk.h
r1241 r1243 165 165 } 166 166 void _setCoeff(int col, int row, double value) { 167 /// FIXME not yet implemented 167 ///FIXME Of course this is not efficient at all, but GLPK knows not more. 168 int change_this; 169 bool get_set_row; 170 //The only thing we can do is optimize on whether working with a row 171 //or a coloumn 172 int row_num = rowNum(); 173 int col_num = colNum(); 174 if (col_num<row_num){ 175 //There are more rows than coloumns 176 get_set_row=true; 177 int mem_length=1+row_num; 178 int* indices = new int[mem_length]; 179 double* doubles = new double[mem_length]; 180 int length=lpx_get_mat_col(lp, i, indices, doubles); 181 }else{ 182 get_set_row=false; 183 int mem_length=1+col_num; 184 int* indices = new int[mem_length]; 185 double* doubles = new double[mem_length]; 186 int length=lpx_get_mat_row(lp, i, indices, doubles); 187 } 188 //Itten 189 int* indices = new int[mem_length]; 190 double* doubles = new double[mem_length]; 191 int length=lpx_get_mat_col(lp, i, indices, doubles); 192 193 delete [] indices; 194 delete [] doubles; 195 168 196 } 169 197 double _getCoeff(int col, int row) {
Note: See TracChangeset
for help on using the changeset viewer.