Changeset 1105


Ignore:
Timestamp:
Sep 13, 2007 11:32:39 AM (12 years ago)
Author:
forrest
Message:

move some stuff to stable

Location:
stable/1.4/Clp/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/1.4/Clp/src/ClpSimplex.cpp

    r995 r1105  
    88168816  }
    88178817}
     8818// Gets clean and emptyish factorization
     8819ClpFactorization *
     8820ClpSimplex::getEmptyFactorization()
     8821{
     8822  if ((specialOptions_&65536)==0) {
     8823    assert (!factorization_);
     8824    factorization_=new ClpFactorization();
     8825  } else if (!factorization_) {
     8826    factorization_=new ClpFactorization();
     8827    factorization_->setPersistenceFlag(1);
     8828  }
     8829  return factorization_;
     8830}
     8831// May delete or may make clean and emptyish factorization
     8832void
     8833ClpSimplex::setEmptyFactorization()
     8834{
     8835  if (factorization_) {
     8836    factorization_->cleanUp();
     8837    if ((specialOptions_&65536)==0) {
     8838      delete factorization_;
     8839      factorization_=NULL;
     8840    } else if (factorization_) {
     8841      factorization_->almostDestructor();
     8842    }
     8843  }
     8844}
     8845// Move status and solution across
     8846void
     8847ClpSimplex::moveInfo(const ClpSimplex & rhs, bool justStatus)
     8848{
     8849  objectiveValue_ = rhs.objectiveValue_;
     8850  numberIterations_ = rhs. numberIterations_;
     8851  problemStatus_ = rhs. problemStatus_;
     8852  secondaryStatus_ = rhs. secondaryStatus_;
     8853  assert (numberRows_ == rhs.numberRows_);
     8854  assert (numberColumns_ == rhs.numberColumns_);
     8855  if (!justStatus) {
     8856    delete [] status_;
     8857    if (rhs.status_) {
     8858      status_ = CoinCopyOfArray(rhs.status_,numberRows_+numberColumns_);
     8859    } else {
     8860      status_ = NULL;
     8861    }
     8862    memcpy(columnActivity_,rhs.columnActivity_,numberColumns_*sizeof(double));
     8863    memcpy(reducedCost_,rhs.reducedCost_,numberColumns_*sizeof(double));
     8864    memcpy(rowActivity_,rhs.rowActivity_,numberRows_*sizeof(double));
     8865    memcpy(dual_,rhs.dual_,numberRows_*sizeof(double));
     8866  }
     8867}
    88188868// Create C++ lines to get to current state
    88198869void
  • stable/1.4/Clp/src/ClpSimplex.hpp

    r1015 r1105  
    954954  /// Create C++ lines to get to current state
    955955  void generateCpp( FILE * fp,bool defaultFactor=false);
     956  /// Gets clean and emptyish factorization
     957  ClpFactorization * getEmptyFactorization();
     958  /// May delete or may make clean and emptyish factorization
     959  void setEmptyFactorization();
     960  /// Move status and solution across
     961  void moveInfo(const ClpSimplex & rhs, bool justStatus=false);
    956962  /** For advanced options
    957963      1 - Don't keep changing infeasibility weight
Note: See TracChangeset for help on using the changeset viewer.