COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
03/22/05 17:49:30 (19 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1670
Message:

Ami félig van kész, ma már félig marad...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/lp/lp_solver_glpk.h

    r1241 r1243  
    165165    }
    166166    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     
     189int* 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
    168196    }
    169197    double _getCoeff(int col, int row) {
Note: See TracChangeset for help on using the changeset viewer.