Ignore:
Timestamp:
Sep 4, 2008 4:46:53 PM (12 years ago)
Author:
forrest
Message:

trying to make faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpModel.cpp

    r1264 r1266  
    306306    // later may want to keep as unknown class
    307307    CoinPackedMatrix matrix2;
     308    matrix2.setExtraGap(0.0);
     309    matrix2.setExtraMajor(0.0);
    308310    matrix2.reverseOrderedCopyOf(*matrix.getPackedMatrix());
    309311    matrix.releasePackedMatrix();
     
    319321                                const double * rowObjective)
    320322{
     323  ClpPackedMatrix* clpMatrix =
     324    dynamic_cast< ClpPackedMatrix*>(matrix_);
     325  bool special = (clpMatrix) ? clpMatrix->wantsSpecialColumnCopy() : false;
    321326  gutsOfLoadModel(matrix.getNumRows(),matrix.getNumCols(),
    322327                  collb, colub, obj, rowlb, rowub, rowObjective);
    323328  if (matrix.isColOrdered()) {
    324329    matrix_=new ClpPackedMatrix(matrix);
     330    if (special) {
     331      clpMatrix = dynamic_cast< ClpPackedMatrix*>(matrix_);
     332      clpMatrix->makeSpecialColumnCopy();
     333    }
    325334  } else {
    326335    CoinPackedMatrix matrix2;
     336    matrix2.setExtraGap(0.0);
     337    matrix2.setExtraMajor(0.0);
    327338    matrix2.reverseOrderedCopyOf(matrix);
    328339    matrix_=new ClpPackedMatrix(matrix2);
     
    37263737  if (!scaledMatrix_||!rowScale_) {
    37273738    if (rowScale_)
    3728       matrix_->transposeTimes(scalar,x,y,rowScale_,columnScale_);
     3739      matrix_->transposeTimes(scalar,x,y,rowScale_,columnScale_,NULL);
    37293740    else
    37303741      matrix_->transposeTimes(scalar,x,y);
     
    38063817  CoinModel * coinModel = new CoinModel();
    38073818  CoinPackedMatrix matrixByRow;
     3819  matrixByRow.setExtraGap(0.0);
     3820  matrixByRow.setExtraMajor(0.0);
    38083821  matrixByRow.reverseOrderedCopyOf(*matrix());
    38093822  coinModel->setObjectiveOffset(objectiveOffset());
     
    39663979  // Get a row copy in standard format
    39673980  CoinPackedMatrix * copy = new CoinPackedMatrix();
     3981  copy->setExtraGap(0.0);
     3982  copy->setExtraMajor(0.0);
    39683983  copy->reverseOrderedCopyOf(*columnCopy);
    39693984  // make sure ordered and no gaps
Note: See TracChangeset for help on using the changeset viewer.