lemon/cplex.cc
changeset 1130 0759d974de81
parent 1125 1ad592289f93
child 1140 f8ec64f78b5f
equal deleted inserted replaced
13:690d0289331f 14:1e1d8c64679b
    85 
    85 
    86   CplexBase::CplexBase(const CplexBase& cplex)
    86   CplexBase::CplexBase(const CplexBase& cplex)
    87     : LpBase() {
    87     : LpBase() {
    88     int status;
    88     int status;
    89     _prob = CPXcloneprob(cplexEnv(), cplex._prob, &status);
    89     _prob = CPXcloneprob(cplexEnv(), cplex._prob, &status);
    90     rows = cplex.rows;
    90     _rows = cplex._rows;
    91     cols = cplex.cols;
    91     _cols = cplex._cols;
    92     messageLevel(MESSAGE_NOTHING);
    92     messageLevel(MESSAGE_NOTHING);
    93   }
    93   }
    94 
    94 
    95   CplexBase::~CplexBase() {
    95   CplexBase::~CplexBase() {
    96     CPXfreeprob(cplexEnv(),&_prob);
    96     CPXfreeprob(cplexEnv(),&_prob);
   156   void CplexBase::_eraseRow(int i) {
   156   void CplexBase::_eraseRow(int i) {
   157     CPXdelrows(cplexEnv(), _prob, i, i);
   157     CPXdelrows(cplexEnv(), _prob, i, i);
   158   }
   158   }
   159 
   159 
   160   void CplexBase::_eraseColId(int i) {
   160   void CplexBase::_eraseColId(int i) {
   161     cols.eraseIndex(i);
   161     _cols.eraseIndex(i);
   162     cols.shiftIndices(i);
   162     _cols.shiftIndices(i);
   163   }
   163   }
   164   void CplexBase::_eraseRowId(int i) {
   164   void CplexBase::_eraseRowId(int i) {
   165     rows.eraseIndex(i);
   165     _rows.eraseIndex(i);
   166     rows.shiftIndices(i);
   166     _rows.shiftIndices(i);
   167   }
   167   }
   168 
   168 
   169   void CplexBase::_getColName(int col, std::string &name) const {
   169   void CplexBase::_getColName(int col, std::string &name) const {
   170     int size;
   170     int size;
   171     CPXgetcolname(cplexEnv(), _prob, 0, 0, 0, &size, col, col);
   171     CPXgetcolname(cplexEnv(), _prob, 0, 0, 0, &size, col, col);