Changeset 2591:3b4d5bc3b4fb in lemon0.x
 Timestamp:
 03/01/08 21:09:40 (12 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3473
 Location:
 lemon
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

lemon/lp_cplex.cc
r2553 r2591 92 92 93 93 storespace *= 1; 94 char buf[storespace];94 std::vector<char> buf(storespace); 95 95 char *names[1]; 96 96 int dontcare; 97 97 ///\bug return code unchecked for error 98 CPXgetcolname(env, lp, names, buf, storespace, &dontcare, col, col);98 CPXgetcolname(env, lp, names, &*buf.begin(), storespace, &dontcare, col, col); 99 99 name = names[0]; 100 100 } … … 403 403 bool LpCplex::_isBasicCol(int i) const 404 404 { 405 int cstat[CPXgetnumcols(env, lp)];406 CPXgetbase(env, lp, cstat, NULL);405 std::vector<int> cstat(CPXgetnumcols(env, lp)); 406 CPXgetbase(env, lp, &*cstat.begin(), NULL); 407 407 return (cstat[i]==CPX_BASIC); 408 408 } 
lemon/lp_glpk.cc
r2553 r2591 65 65 LEMON_glp(add_cols)(lp, LEMON_glp(get_num_cols)(glp.lp)); 66 66 int len; 67 int ind[1+LEMON_glp(get_num_cols)(glp.lp)];68 Value val[1+LEMON_glp(get_num_cols)(glp.lp)];67 std::vector<int> ind(1+LEMON_glp(get_num_cols)(glp.lp)); 68 std::vector<Value> val(1+LEMON_glp(get_num_cols)(glp.lp)); 69 69 for (int i=1;i<=LEMON_glp(get_num_rows)(glp.lp);++i) 70 70 { 71 len=LEMON_glp(get_mat_row)(glp.lp,i, ind,val);72 LEMON_glp(set_mat_row)(lp, i,len, ind,val);71 len=LEMON_glp(get_mat_row)(glp.lp,i,&*ind.begin(),&*val.begin()); 72 LEMON_glp(set_mat_row)(lp, i,len,&*ind.begin(),&*val.begin()); 73 73 LEMON_glp(set_row_bnds)(lp,i, 74 74 LEMON_glp(get_row_type)(glp.lp,i),
Note: See TracChangeset
for help on using the changeset viewer.