269 const double *collb,
const double *colub,
271 const double *rowlb,
const double *rowub,
272 bool makeRowCopy =
false);
Sparse Matrix Base Class.
NON Abstract Base Class for interfacing with cut generators or branching code or .
double primalTolerance_
primal tolerance
double objValue_
objective function value (including any rhs offset)
int numIntegers_
number of integer variables
const double * objCoefficients_
pointer to array[getNumCols()] of objective function coefficients
double objSense_
objective function sense (1 for min (default), -1 for max)
int numElements_
number of nonzero elements
double integerUpperBound_
integer upper bound i.e. best solution * getObjSense
void setObjValue(double value)
Set objective function value (including any rhs offset)
bool isFreeBinary(int colIndex) const
Return true if variable is binary and not fixed at either bound.
const char * colType_
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...
void setRowLower(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row lower bounds.
void setIntegerLowerBound(double value)
Set integer lower bound i.e. best possible solution * getObjSense.
const char * getColType() const
Get colType array ('B', 'I', or 'C' for Binary, Integer and Continuous)
double getPrimalTolerance() const
Get primal tolerance.
void setDualTolerance(double value)
Set dual tolerance.
const CoinPackedMatrix * originalMatrixByRow_
pointer to row-wise copy of "original" matrix
const double * reducedCost_
a pointer to array[getNumCols()] of reduced costs
void gutsOfDestructor(int type)
Does main work of destructor - type (or'ed) 1 - NULLify pointers 2 - delete pointers 4 - initialize s...
const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
void setColLower(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of column lower bounds.
void setDoNotSeparateThis(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of primal variable values which should not be separated (for debug...
const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
bool isIntegerNonBinary(int colIndex) const
Return true if variable is general integer.
CoinSnapshot & operator=(const CoinSnapshot &rhs)
Assignment operator.
const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
void setRowUpper(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row upper bounds.
double integerTolerance_
integer tolerance
bool isInteger(int colIndex) const
Return true if column is integer.
double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
const double * rowLower_
pointer to array[getNumRows()] of row lower bounds
double getIntegerUpperBound() const
Get integer upper bound i.e. best solution * getObjSense.
const double * rowUpper_
pointer to array[getNumRows()] of row upper bounds
double getDualTolerance() const
Get dual tolerance.
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.
void setRowActivity(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
const double * colLower_
pointer to array[getNumCols()] of column lower bounds
void createMatrixByRow()
Create row-wise copy from MatrixByCol.
void setMatrixByRow(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to row-wise copy of current matrix.
double getInfinity() const
Get solver's value for infinity.
void setRightHandSide(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row right-hand sides This gives same results as OsiSolverInterf...
const double * doNotSeparateThis_
pointer to array[getNumCols()] of primal variable values which should not be separated (for debug)
void setIntegerUpperBound(double value)
Set integer upper bound i.e. best solution * getObjSense.
const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of current matrix.
int getNumRows() const
Get number of rows.
const double * rightHandSide_
pointer to array[getNumRows()] of rhs side values
const double * colUpper_
pointer to array[getNumCols()] of column upper bounds
double integerLowerBound_
integer lower bound i.e. best possible solution * getObjSense
double getObjOffset() const
Get objective offset i.e. sum c sub j * x subj -objValue = objOffset.
void setColUpper(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of column upper bounds.
const double * getColSolution() const
Get pointer to array[getNumCols()] of primal variable values.
void setColSolution(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of primal variable values.
const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of current matrix.
virtual ~CoinSnapshot()
Destructor.
double getObjValue() const
Get objective function value - includinbg any offset i.e.
const CoinPackedMatrix * matrixByRow_
pointer to row-wise copy of current matrix
const CoinPackedMatrix * getOriginalMatrixByCol() const
Get pointer to column-wise copy of "original" matrix.
void setPrimalTolerance(double value)
Set primal tolerance.
const double * rowActivity_
pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vector).
const double * rowPrice_
pointer to array[getNumRows()] of dual variable values
const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual variable values.
void setRowPrice(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of dual variable values.
const CoinPackedMatrix * originalMatrixByCol_
pointer to column-wise copy of "original" matrix
void setInfinity(double value)
Set solver's value for infinity.
int numCols_
number of columns
void gutsOfCopy(const CoinSnapshot &rhs)
Does main work of copy.
const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
int numRows_
number of rows
void createRightHandSide()
Create array[getNumRows()] of row right-hand sides using existing information This gives same results...
const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
void setObjSense(double value)
Set objective function sense (1 for min (default), -1 for max)
int getNumCols() const
Get number of columns.
double infinity_
solver's value for infinity
void setOriginalMatrixByCol(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to column-wise copy of "original" matrix.
void setNumElements(int value)
Set number of nonzero elements.
double getIntegerTolerance() const
Get integer tolerance.
const double * colSolution_
pointer to array[getNumCols()] of primal variable values
const CoinPackedMatrix * matrixByCol_
pointer to column-wise copy of current matrix
const double * getDoNotSeparateThis() const
Get pointer to array[getNumCols()] of primal variable values which should not be separated (for debug...
const double * getRightHandSide() const
Get pointer to array[getNumRows()] of row right-hand sides This gives same results as OsiSolverInterf...
void setReducedCost(const double *array, bool copyIn=true)
Set a pointer to array[getNumCols()] of reduced costs.
bool isBinary(int colIndex) const
Return true if variable is binary.
void setObjCoefficients(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of objective function coefficients.
void setMatrixByCol(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to column-wise copy of current matrix.
const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
double dualTolerance_
dual tolerance
const CoinPackedMatrix * getOriginalMatrixByRow() const
Get pointer to row-wise copy of "original" matrix.
CoinSnapshot(const CoinSnapshot &)
Copy constructor.
void setNumIntegers(int value)
Set number of integer variables.
CoinSnapshot()
Default Constructor.
void setOriginalMatrixByRow(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to row-wise copy of "original" matrix.
bool isContinuous(int colIndex) const
Return true if variable is continuous.
int getNumElements() const
Get number of nonzero elements.
void setNumRows(int value)
Set number of rows.
void setIntegerTolerance(double value)
Set integer tolerance.
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...
double getIntegerLowerBound() const
Get integer lower bound i.e. best possible solution * getObjSense.
void setNumCols(int value)
Set number of columns.
double objOffset_
objective offset i.e. sum c sub j * x subj -objValue = objOffset
void setColType(const char *array, bool copyIn=true)
Set colType array ('B', 'I', or 'C' for Binary, Integer and Continuous)
To say whether arrays etc are owned by CoinSnapshot.
unsigned int doNotSeparateThis
unsigned int originalMatrixByCol
unsigned int originalMatrixByRow
unsigned int objCoefficients
unsigned int rightHandSide