Changeset 381


Ignore:
Timestamp:
May 31, 2004 9:55:37 AM (14 years ago)
Author:
forrest
Message:

deleting columns when small matrix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpModel.cpp

    r372 r381  
    793793  columnUpper_ = deleteDouble(columnUpper_,numberColumns_,
    794794                              number, which, newSize);
    795   matrix_->deleteCols(number,which);
     795  // possible matrix is not full
     796  if (matrix_->getNumCols()<numberColumns_) {
     797    int * which2 = new int [number];
     798    int n=0;
     799    int nMatrix = matrix_->getNumCols();
     800    for (int i=0;i<number;i++) {
     801      if (which[i]<nMatrix)
     802        which2[n++]=which[i];
     803    }
     804    matrix_->deleteCols(n,which2);
     805    delete [] which2;
     806  } else {
     807    matrix_->deleteCols(number,which);
     808  }
    796809  //matrix_->removeGaps();
    797810  // status
Note: See TracChangeset for help on using the changeset viewer.