src/work/athos/lp/lp_glpk.cc
changeset 1263 a490938ad0aa
parent 1261 9d0deeea8c08
child 1293 8ede2a6b2594
equal deleted inserted replaced
0:9aa6cecb6d60 1:458da1db3420
    39     }
    39     }
    40 
    40 
    41   
    41   
    42     void LpGlpk::_setRowCoeffs(int i, 
    42     void LpGlpk::_setRowCoeffs(int i, 
    43 			       int length,
    43 			       int length,
    44 			       int   * indices, 
    44 			       const int   * indices, 
    45 			       Value   * values )
    45 			       const Value   * values )
    46     {
    46     {
    47 	lpx_set_mat_row(lp, i, length, indices, values);
    47       lpx_set_mat_row(lp, i, length,
       
    48 		      const_cast<int * >(indices) ,
       
    49 		      const_cast<Value * >(values));
    48     }
    50     }
    49   
    51   
    50     void LpGlpk::_setColCoeffs(int i, 
    52     void LpGlpk::_setColCoeffs(int i, 
    51 			       int length,
    53 			       int length,
    52 			       int   * indices, 
    54 			       const int   * indices, 
    53 			       Value   * values)
    55 			       const Value   * values)
    54     {
    56     {
    55 	lpx_set_mat_col(lp, i, length, indices, values);
    57       lpx_set_mat_col(lp, i, length,
       
    58 		      const_cast<int * >(indices),
       
    59 		      const_cast<Value * >(values));
    56     }
    60     }
    57   
    61   
    58     void LpGlpk::_setColLowerBound(int i, Value lo)
    62     void LpGlpk::_setColLowerBound(int i, Value lo)
    59     {
    63     {
    60       if (lo==INF) {
    64       if (lo==INF) {
   231     void LpGlpk::_setObjCoeff(int i, Value obj_coef)
   235     void LpGlpk::_setObjCoeff(int i, Value obj_coef)
   232     {
   236     {
   233       lpx_set_obj_coef(lp, i, obj_coef);
   237       lpx_set_obj_coef(lp, i, obj_coef);
   234     }
   238     }
   235 
   239 
       
   240 
       
   241   LpGlpk::SolutionType LpGlpk::_solve()
       
   242   {
       
   243     return OPTIMAL;
       
   244   }
       
   245 
       
   246   LpGlpk::Value LpGlpk::_getSolution(int i)
       
   247   {
       
   248     return 0;
       
   249   }
       
   250   
       
   251 
       
   252 
   236 } //END OF NAMESPACE LEMON
   253 } //END OF NAMESPACE LEMON
   237 
   254 
   238 #endif //LEMON_LP_GLPK_CC
   255 #endif //LEMON_LP_GLPK_CC