45 {
return numElements_;}
49 {
return numIntegers_;}
75 {
return rightHandSide_;}
79 {
return objCoefficients_;}
87 {
return colType_[colIndex]==
'C';}
91 {
return colType_[colIndex]==
'B';}
95 {
return colType_[colIndex]==
'B'||colType_[colIndex]==
'I';}
99 {
return colType_[colIndex]==
'I';}
103 {
return colType_[colIndex]==
'B'&&colUpper_[colIndex]>colLower_[colIndex];}
111 {
return matrixByRow_;}
115 {
return matrixByCol_;}
119 {
return originalMatrixByRow_;}
123 {
return originalMatrixByCol_;}
130 {
return colSolution_;}
138 {
return reducedCost_;}
142 {
return rowActivity_;}
146 {
return doNotSeparateThis_;}
162 {
return objOffset_;}
166 {
return dualTolerance_;}
170 {
return primalTolerance_;}
174 {
return integerTolerance_;}
178 {
return integerUpperBound_;}
182 {
return integerLowerBound_;}
202 const double* collb,
const double* colub,
204 const double* rowlb,
const double* rowub,
205 bool makeRowCopy=
false);
223 { numElements_ = value;}
227 { numIntegers_ = value;}
230 void setColLower(
const double * array,
bool copyIn=
true);
233 void setColUpper(
const double * array,
bool copyIn=
true);
236 void setRowLower(
const double * array,
bool copyIn=
true);
239 void setRowUpper(
const double * array,
bool copyIn=
true);
265 { objSense_ = value;}
268 void setColType(
const char *array,
bool copyIn=
true);
289 void setRowPrice(
const double * array,
bool copyIn=
true);
302 { infinity_ = value;}
306 { objValue_ = value;}
310 { objOffset_ = value;}
314 { dualTolerance_ = value;}
318 { primalTolerance_ = value;}
322 { integerTolerance_ = value;}
326 { integerUpperBound_ = value;}
330 { integerLowerBound_ = value;}
360 void gutsOfDestructor(
int type);
380 double dualTolerance_;
383 double primalTolerance_;
386 double integerTolerance_;
389 double integerUpperBound_;
392 double integerLowerBound_;
395 const double * colLower_;
398 const double * colUpper_;
401 const double * rowLower_;
404 const double * rowUpper_;
407 const double * rightHandSide_;
410 const double * objCoefficients_;
413 const char * colType_;
428 const double * colSolution_;
431 const double * rowPrice_;
434 const double * reducedCost_;
437 const double * rowActivity_;
440 const double * doNotSeparateThis_;
456 unsigned int colLower:1;
457 unsigned int colUpper:1;
458 unsigned int rowLower:1;
459 unsigned int rowUpper:1;
460 unsigned int rightHandSide:1;
461 unsigned int objCoefficients:1;
462 unsigned int colType:1;
463 unsigned int matrixByRow:1;
464 unsigned int matrixByCol:1;
465 unsigned int originalMatrixByRow:1;
466 unsigned int originalMatrixByCol:1;
467 unsigned int colSolution:1;
468 unsigned int rowPrice:1;
469 unsigned int reducedCost:1;
470 unsigned int rowActivity:1;
471 unsigned int doNotSeparateThis:1;
CoinSnapshot & operator=(const CoinSnapshot &rhs)
Assignment operator.
const char * getColType() const
Get colType array ('B', 'I', or 'C' for Binary, Integer and Continuous)
void setColSolution(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of primal variable values.
int getNumElements() const
Get number of nonzero elements.
void setNumIntegers(int value)
Set number of integer variables.
const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
double getPrimalTolerance() const
Get primal tolerance.
double getObjValue() const
Get objective function value - includinbg any offset i.e.
void setRowLower(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row lower bounds.
void createRightHandSide()
Create array[getNumRows()] of row right-hand sides using existing information This gives same results...
double getDualTolerance() const
Get dual tolerance.
void setDualTolerance(double value)
Set dual tolerance.
NON Abstract Base Class for interfacing with cut generators or branching code or .
const double * getDoNotSeparateThis() const
Get pointer to array[getNumCols()] of primal variable values which should not be separated (for debug...
double getObjOffset() const
Get objective offset i.e. sum c sub j * x subj -objValue = objOffset.
void setColLower(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of column lower bounds.
int getNumCols() const
Get number of columns.
bool isContinuous(int colIndex) const
Return true if variable is continuous.
double getIntegerLowerBound() const
Get integer lower bound i.e. best possible solution * getObjSense.
void setNumRows(int value)
Set number of rows.
const double * getColSolution() const
Get pointer to array[getNumCols()] of primal variable values.
void createMatrixByRow()
Create row-wise copy from MatrixByCol.
double getInfinity() const
Get solver's value for infinity.
const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
int getNumIntegers() const
Get number of integer variables.
void setObjOffset(double value)
Set objective offset i.e. sum c sub j * x subj -objValue = objOffset.
const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
CoinSnapshot()
Default Constructor.
void setObjSense(double value)
Set objective function sense (1 for min (default), -1 for max)
bool isFreeBinary(int colIndex) const
Return true if variable is binary and not fixed at either bound.
void setDoNotSeparateThis(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of primal variable values which should not be separated (for debug...
void setRowActivity(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of current matrix.
double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
bool isBinary(int colIndex) const
Return true if variable is binary.
void setOriginalMatrixByCol(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to column-wise copy of "original" matrix.
const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
void setIntegerTolerance(double value)
Set integer tolerance.
void setNumCols(int value)
Set number of columns.
void setIntegerUpperBound(double value)
Set integer upper bound i.e. best solution * getObjSense.
void setColUpper(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of column upper bounds.
const CoinPackedMatrix * getOriginalMatrixByCol() const
Get pointer to column-wise copy of "original" matrix.
void loadProblem(const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, bool makeRowCopy=false)
Load in an problem by copying the arguments (the constraints on the rows are given by lower and upper...
void setIntegerLowerBound(double value)
Set integer lower bound i.e. best possible solution * getObjSense.
const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
void setRightHandSide(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row right-hand sides This gives same results as OsiSolverInterf...
Sparse Matrix Base Class.
int getNumRows() const
Get number of rows.
void setReducedCost(const double *array, bool copyIn=true)
Set a pointer to array[getNumCols()] of reduced costs.
void setInfinity(double value)
Set solver's value for infinity.
double getIntegerTolerance() const
Get integer tolerance.
double getIntegerUpperBound() const
Get integer upper bound i.e. best solution * getObjSense.
void setMatrixByRow(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to row-wise copy of current matrix.
void setColType(const char *array, bool copyIn=true)
Set colType array ('B', 'I', or 'C' for Binary, Integer and Continuous)
const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual variable values.
const CoinPackedMatrix * getOriginalMatrixByRow() const
Get pointer to row-wise copy of "original" matrix.
void setMatrixByCol(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to column-wise copy of current matrix.
virtual ~CoinSnapshot()
Destructor.
const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of current matrix.
bool isInteger(int colIndex) const
Return true if column is integer.
void setObjValue(double value)
Set objective function value (including any rhs offset)
void setOriginalMatrixByRow(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to row-wise copy of "original" matrix.
bool isIntegerNonBinary(int colIndex) const
Return true if variable is general integer.
void setRowUpper(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row upper bounds.
void setNumElements(int value)
Set number of nonzero elements.
void setObjCoefficients(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of objective function coefficients.
void setPrimalTolerance(double value)
Set primal tolerance.
void setRowPrice(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of dual variable values.
const double * getRightHandSide() const
Get pointer to array[getNumRows()] of row right-hand sides This gives same results as OsiSolverInterf...
const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.