Dip  0.92.4
Public Member Functions | List of all members
OsiData Class Reference

Class collecting pointers on data for OsiEmpty. More...

#include <OsiData.hpp>

+ Collaboration diagram for OsiData:

Public Member Functions

void convertBoundToSense (const double lower, const double upper, char &sense, double &right, double &range) const
 A quick inlined function to convert from the lb/ub style of constraint definition to the sense/rhs/range style. More...
 
void convertBoundToSense (const double lower, const double upper, char &sense, double &right, double &range) const
 A quick inlined function to convert from the lb/ub style of constraint definition to the sense/rhs/range style. More...
 
Public Set/get methods
virtual void setInfinity (const double givenInfinity)
 Set infinity. More...
 
double getInfinity () const
 Get infinity. More...
 
virtual void setNrow (const int givenNrow)
 Set nrow to the number of rows. More...
 
int getNrow () const
 Get nrow. More...
 
virtual void setNcol (const int givenNcol)
 Set ncol to the number of variables. More...
 
int getNcol () const
 Get ncol. More...
 
virtual void setMatrixByCol (const CoinPackedMatrix *givenMatrixByCol)
 Set matrixByCol to point on the coefficient matrix ordered by columns. More...
 
const CoinPackedMatrixgetMatrixByCol () const
 Get matrixByCol. More...
 
virtual void setMatrixByRow (const CoinPackedMatrix *givenMatrixByRow)
 Set matrixByRow to point on the coefficient matrix ordered by rows. More...
 
const CoinPackedMatrixgetMatrixByRow () const
 Get matrixByRow. More...
 
virtual void setObj (const double *givenObj)
 Set obj to point on a vector holding the objective coefficient values. More...
 
const double * getObj () const
 Get obj. More...
 
virtual void setColLower (const double *givenColLower)
 Set colLower to point on a vector holding the lower bounds on the variables. More...
 
const double * getColLower () const
 Get colLower. More...
 
virtual void setColUpper (const double *givenColUpper)
 Set colUpper to point on a vector holding the upper bounds on the variables. More...
 
const double * getColUpper () const
 Get colUpper. More...
 
virtual void setRowLower (const double *givenRowLower)
 Set rowLower to point on a vector holding the lower bounds on the constraints. More...
 
const double * getRowLower () const
 Get rowLower. More...
 
virtual void setRowUpper (const double *givenRowUpper)
 Set rowUpper to point on a vector holding the upper bounds on the constraints. More...
 
const double * getRowUpper () const
 Get rowUpper. More...
 
const double * getRowRhs () const
 Set rowRhs to point on a vector holding the right hand side of the constraints (for a ranged constraint, it contains the upper bound). More...
 
const double * getRowRange () const
 Get rowRange. More...
 
const char * getRowSense () const
 Get rowSense. More...
 
const double * getRowActivity () const
 Set rowActivity to point on a vector holding the activity of the constraints (i.e. More...
 
virtual void setColType (const char *givenColType)
 Set colType to point on a vector holding the type of the variables ('B', 'I', or 'C' for Binary, Integer and Continuous) More...
 
const char * getColType () const
 Get colType. More...
 
virtual void setPrimalSol (const double *givenPrimalSol)
 Set primal solution. More...
 
const double * getPrimalSol () const
 Get primal solution. More...
 
void initializeOtherData ()
 initialize the non-const data More...
 
virtual void setInfinity (const double givenInfinity)
 Set infinity. More...
 
double getInfinity () const
 Get infinity. More...
 
virtual void setNrow (const int givenNrow)
 Set nrow to the number of rows. More...
 
int getNrow () const
 Get nrow. More...
 
virtual void setNcol (const int givenNcol)
 Set ncol to the number of variables. More...
 
int getNcol () const
 Get ncol. More...
 
virtual void setMatrixByCol (const CoinPackedMatrix *givenMatrixByCol)
 Set matrixByCol to point on the coefficient matrix ordered by columns. More...
 
const CoinPackedMatrixgetMatrixByCol () const
 Get matrixByCol. More...
 
virtual void setMatrixByRow (const CoinPackedMatrix *givenMatrixByRow)
 Set matrixByRow to point on the coefficient matrix ordered by rows. More...
 
const CoinPackedMatrixgetMatrixByRow () const
 Get matrixByRow. More...
 
virtual void setObj (const double *givenObj)
 Set obj to point on a vector holding the objective coefficient values. More...
 
const double * getObj () const
 Get obj. More...
 
virtual void setColLower (const double *givenColLower)
 Set colLower to point on a vector holding the lower bounds on the variables. More...
 
const double * getColLower () const
 Get colLower. More...
 
virtual void setColUpper (const double *givenColUpper)
 Set colUpper to point on a vector holding the upper bounds on the variables. More...
 
const double * getColUpper () const
 Get colUpper. More...
 
virtual void setRowLower (const double *givenRowLower)
 Set rowLower to point on a vector holding the lower bounds on the constraints. More...
 
const double * getRowLower () const
 Get rowLower. More...
 
virtual void setRowUpper (const double *givenRowUpper)
 Set rowUpper to point on a vector holding the upper bounds on the constraints. More...
 
const double * getRowUpper () const
 Get rowUpper. More...
 
const double * getRowRhs () const
 Set rowRhs to point on a vector holding the right hand side of the constraints (for a ranged constraint, it contains the upper bound). More...
 
const double * getRowRange () const
 Get rowRange. More...
 
const char * getRowSense () const
 Get rowSense. More...
 
const double * getRowActivity () const
 Set rowActivity to point on a vector holding the activity of the constraints (i.e. More...
 
virtual void setColType (const char *givenColType)
 Set colType to point on a vector holding the type of the variables ('B', 'I', or 'C' for Binary, Integer and Continuous) More...
 
const char * getColType () const
 Get colType. More...
 
virtual void setPrimalSol (const double *givenPrimalSol)
 Set primal solution. More...
 
const double * getPrimalSol () const
 Get primal solution. More...
 
void initializeOtherData ()
 initialize the non-const data More...
 
Constructors and destructors
 OsiData (const double givenInfinity=DBL_MAX, const int &givenNrow=0, const int &givenNcol=0, const CoinPackedMatrix *givenMatrixByCol=NULL, const CoinPackedMatrix *givenMatrixByRow=NULL, const double *givenObj=NULL, const double *givenColLower=NULL, const double *givenColUpper=NULL, const double *givenRowLower=NULL, const double *givenRowUpper=NULL, const char *givenColType=NULL, const double *givenPrimalSol=NULL)
 Default constructor. More...
 
virtual ~OsiData ()
 Destructor. More...
 
 OsiData (const double givenInfinity=DBL_MAX, const int &givenNrow=0, const int &givenNcol=0, const CoinPackedMatrix *givenMatrixByCol=NULL, const CoinPackedMatrix *givenMatrixByRow=NULL, const double *givenObj=NULL, const double *givenColLower=NULL, const double *givenColUpper=NULL, const double *givenRowLower=NULL, const double *givenRowUpper=NULL, const char *givenColType=NULL, const double *givenPrimalSol=NULL)
 Default constructor. More...
 
virtual ~OsiData ()
 Destructor. More...
 

Protected Attributes

Private member data
double infinity
 
int nrow
 
int ncol
 
CoinPackedMatrix const * matrixByCol
 
CoinPackedMatrix const * matrixByRow
 
const double * obj
 
const double * colLower
 
const double * colUpper
 
const double * rowLower
 
const double * rowUpper
 
const char * colType
 Pointer on vector of characters for columns types. More...
 
const double * primalSol
 
double * rowRhs
 
double * rowRange
 
char * rowSense
 
double * rowActivity
 

Detailed Description

Class collecting pointers on data for OsiEmpty.

Each generator may have a derived class to add additional pointers on data. If a data member is not used by a generator, the data member need not be defined (or may be NULL). Ownership of the data remains with the calling method.

Definition at line 22 of file OsiData.hpp.

Constructor & Destructor Documentation

◆ OsiData() [1/2]

OsiData::OsiData ( const double  givenInfinity = DBL_MAX,
const int &  givenNrow = 0,
const int &  givenNcol = 0,
const CoinPackedMatrix givenMatrixByCol = NULL,
const CoinPackedMatrix givenMatrixByRow = NULL,
const double *  givenObj = NULL,
const double *  givenColLower = NULL,
const double *  givenColUpper = NULL,
const double *  givenRowLower = NULL,
const double *  givenRowUpper = NULL,
const char *  givenColType = NULL,
const double *  givenPrimalSol = NULL 
)
inline

Default constructor.

Definition at line 204 of file OsiData.hpp.

◆ ~OsiData() [1/2]

virtual OsiData::~OsiData ( )
inlinevirtual

Destructor.

Definition at line 231 of file OsiData.hpp.

◆ OsiData() [2/2]

OsiData::OsiData ( const double  givenInfinity = DBL_MAX,
const int &  givenNrow = 0,
const int &  givenNcol = 0,
const CoinPackedMatrix givenMatrixByCol = NULL,
const CoinPackedMatrix givenMatrixByRow = NULL,
const double *  givenObj = NULL,
const double *  givenColLower = NULL,
const double *  givenColUpper = NULL,
const double *  givenRowLower = NULL,
const double *  givenRowUpper = NULL,
const char *  givenColType = NULL,
const double *  givenPrimalSol = NULL 
)
inline

Default constructor.

Definition at line 204 of file OsiData2.hpp.

◆ ~OsiData() [2/2]

virtual OsiData::~OsiData ( )
inlinevirtual

Destructor.

Definition at line 231 of file OsiData2.hpp.

Member Function Documentation

◆ setInfinity() [1/2]

virtual void OsiData::setInfinity ( const double  givenInfinity)
inlinevirtual

Set infinity.

Definition at line 30 of file OsiData.hpp.

◆ getInfinity() [1/2]

double OsiData::getInfinity ( ) const
inline

Get infinity.

Definition at line 35 of file OsiData.hpp.

◆ setNrow() [1/2]

virtual void OsiData::setNrow ( const int  givenNrow)
inlinevirtual

Set nrow to the number of rows.

Definition at line 38 of file OsiData.hpp.

◆ getNrow() [1/2]

int OsiData::getNrow ( ) const
inline

Get nrow.

Definition at line 43 of file OsiData.hpp.

◆ setNcol() [1/2]

virtual void OsiData::setNcol ( const int  givenNcol)
inlinevirtual

Set ncol to the number of variables.

Definition at line 46 of file OsiData.hpp.

◆ getNcol() [1/2]

int OsiData::getNcol ( ) const
inline

Get ncol.

Definition at line 51 of file OsiData.hpp.

◆ setMatrixByCol() [1/2]

virtual void OsiData::setMatrixByCol ( const CoinPackedMatrix givenMatrixByCol)
inlinevirtual

Set matrixByCol to point on the coefficient matrix ordered by columns.

Definition at line 55 of file OsiData.hpp.

◆ getMatrixByCol() [1/2]

const CoinPackedMatrix* OsiData::getMatrixByCol ( ) const
inline

Get matrixByCol.

Definition at line 60 of file OsiData.hpp.

◆ setMatrixByRow() [1/2]

virtual void OsiData::setMatrixByRow ( const CoinPackedMatrix givenMatrixByRow)
inlinevirtual

Set matrixByRow to point on the coefficient matrix ordered by rows.

Definition at line 64 of file OsiData.hpp.

◆ getMatrixByRow() [1/2]

const CoinPackedMatrix* OsiData::getMatrixByRow ( ) const
inline

Get matrixByRow.

Definition at line 69 of file OsiData.hpp.

◆ setObj() [1/2]

virtual void OsiData::setObj ( const double *  givenObj)
inlinevirtual

Set obj to point on a vector holding the objective coefficient values.

Definition at line 72 of file OsiData.hpp.

◆ getObj() [1/2]

const double* OsiData::getObj ( ) const
inline

Get obj.

Definition at line 77 of file OsiData.hpp.

◆ setColLower() [1/2]

virtual void OsiData::setColLower ( const double *  givenColLower)
inlinevirtual

Set colLower to point on a vector holding the lower bounds on the variables.

Definition at line 81 of file OsiData.hpp.

◆ getColLower() [1/2]

const double* OsiData::getColLower ( ) const
inline

Get colLower.

Definition at line 86 of file OsiData.hpp.

◆ setColUpper() [1/2]

virtual void OsiData::setColUpper ( const double *  givenColUpper)
inlinevirtual

Set colUpper to point on a vector holding the upper bounds on the variables.

Definition at line 90 of file OsiData.hpp.

◆ getColUpper() [1/2]

const double* OsiData::getColUpper ( ) const
inline

Get colUpper.

Definition at line 95 of file OsiData.hpp.

◆ setRowLower() [1/2]

virtual void OsiData::setRowLower ( const double *  givenRowLower)
inlinevirtual

Set rowLower to point on a vector holding the lower bounds on the constraints.

Definition at line 99 of file OsiData.hpp.

◆ getRowLower() [1/2]

const double* OsiData::getRowLower ( ) const
inline

Get rowLower.

Definition at line 104 of file OsiData.hpp.

◆ setRowUpper() [1/2]

virtual void OsiData::setRowUpper ( const double *  givenRowUpper)
inlinevirtual

Set rowUpper to point on a vector holding the upper bounds on the constraints.

Definition at line 108 of file OsiData.hpp.

◆ getRowUpper() [1/2]

const double* OsiData::getRowUpper ( ) const
inline

Get rowUpper.

Definition at line 113 of file OsiData.hpp.

◆ getRowRhs() [1/2]

const double* OsiData::getRowRhs ( ) const
inline

Set rowRhs to point on a vector holding the right hand side of the constraints (for a ranged constraint, it contains the upper bound).

Get rowRhs

Definition at line 119 of file OsiData.hpp.

◆ getRowRange() [1/2]

const double* OsiData::getRowRange ( ) const
inline

Get rowRange.

Definition at line 121 of file OsiData.hpp.

◆ getRowSense() [1/2]

const char* OsiData::getRowSense ( ) const
inline

Get rowSense.

Definition at line 123 of file OsiData.hpp.

◆ getRowActivity() [1/2]

const double* OsiData::getRowActivity ( ) const
inline

Set rowActivity to point on a vector holding the activity of the constraints (i.e.

coefficient matrix times separateThis). Get rowActivity

Definition at line 129 of file OsiData.hpp.

◆ setColType() [1/2]

virtual void OsiData::setColType ( const char *  givenColType)
inlinevirtual

Set colType to point on a vector holding the type of the variables ('B', 'I', or 'C' for Binary, Integer and Continuous)

Definition at line 133 of file OsiData.hpp.

◆ getColType() [1/2]

const char* OsiData::getColType ( ) const
inline

Get colType.

Definition at line 138 of file OsiData.hpp.

◆ setPrimalSol() [1/2]

virtual void OsiData::setPrimalSol ( const double *  givenPrimalSol)
inlinevirtual

Set primal solution.

Definition at line 141 of file OsiData.hpp.

◆ getPrimalSol() [1/2]

const double* OsiData::getPrimalSol ( ) const
inline

Get primal solution.

Definition at line 146 of file OsiData.hpp.

◆ initializeOtherData() [1/2]

void OsiData::initializeOtherData ( )
inline

initialize the non-const data

Definition at line 149 of file OsiData.hpp.

◆ convertBoundToSense() [1/2]

void OsiData::convertBoundToSense ( const double  lower,
const double  upper,
char &  sense,
double &  right,
double &  range 
) const
inline

A quick inlined function to convert from the lb/ub style of constraint definition to the sense/rhs/range style.

Definition at line 169 of file OsiData.hpp.

◆ setInfinity() [2/2]

virtual void OsiData::setInfinity ( const double  givenInfinity)
inlinevirtual

Set infinity.

Definition at line 30 of file OsiData2.hpp.

◆ getInfinity() [2/2]

double OsiData::getInfinity ( ) const
inline

Get infinity.

Definition at line 35 of file OsiData2.hpp.

◆ setNrow() [2/2]

virtual void OsiData::setNrow ( const int  givenNrow)
inlinevirtual

Set nrow to the number of rows.

Definition at line 38 of file OsiData2.hpp.

◆ getNrow() [2/2]

int OsiData::getNrow ( ) const
inline

Get nrow.

Definition at line 43 of file OsiData2.hpp.

◆ setNcol() [2/2]

virtual void OsiData::setNcol ( const int  givenNcol)
inlinevirtual

Set ncol to the number of variables.

Definition at line 46 of file OsiData2.hpp.

◆ getNcol() [2/2]

int OsiData::getNcol ( ) const
inline

Get ncol.

Definition at line 51 of file OsiData2.hpp.

◆ setMatrixByCol() [2/2]

virtual void OsiData::setMatrixByCol ( const CoinPackedMatrix givenMatrixByCol)
inlinevirtual

Set matrixByCol to point on the coefficient matrix ordered by columns.

Definition at line 55 of file OsiData2.hpp.

◆ getMatrixByCol() [2/2]

const CoinPackedMatrix* OsiData::getMatrixByCol ( ) const
inline

Get matrixByCol.

Definition at line 60 of file OsiData2.hpp.

◆ setMatrixByRow() [2/2]

virtual void OsiData::setMatrixByRow ( const CoinPackedMatrix givenMatrixByRow)
inlinevirtual

Set matrixByRow to point on the coefficient matrix ordered by rows.

Definition at line 64 of file OsiData2.hpp.

◆ getMatrixByRow() [2/2]

const CoinPackedMatrix* OsiData::getMatrixByRow ( ) const
inline

Get matrixByRow.

Definition at line 69 of file OsiData2.hpp.

◆ setObj() [2/2]

virtual void OsiData::setObj ( const double *  givenObj)
inlinevirtual

Set obj to point on a vector holding the objective coefficient values.

Definition at line 72 of file OsiData2.hpp.

◆ getObj() [2/2]

const double* OsiData::getObj ( ) const
inline

Get obj.

Definition at line 77 of file OsiData2.hpp.

◆ setColLower() [2/2]

virtual void OsiData::setColLower ( const double *  givenColLower)
inlinevirtual

Set colLower to point on a vector holding the lower bounds on the variables.

Definition at line 81 of file OsiData2.hpp.

◆ getColLower() [2/2]

const double* OsiData::getColLower ( ) const
inline

Get colLower.

Definition at line 86 of file OsiData2.hpp.

◆ setColUpper() [2/2]

virtual void OsiData::setColUpper ( const double *  givenColUpper)
inlinevirtual

Set colUpper to point on a vector holding the upper bounds on the variables.

Definition at line 90 of file OsiData2.hpp.

◆ getColUpper() [2/2]

const double* OsiData::getColUpper ( ) const
inline

Get colUpper.

Definition at line 95 of file OsiData2.hpp.

◆ setRowLower() [2/2]

virtual void OsiData::setRowLower ( const double *  givenRowLower)
inlinevirtual

Set rowLower to point on a vector holding the lower bounds on the constraints.

Definition at line 99 of file OsiData2.hpp.

◆ getRowLower() [2/2]

const double* OsiData::getRowLower ( ) const
inline

Get rowLower.

Definition at line 104 of file OsiData2.hpp.

◆ setRowUpper() [2/2]

virtual void OsiData::setRowUpper ( const double *  givenRowUpper)
inlinevirtual

Set rowUpper to point on a vector holding the upper bounds on the constraints.

Definition at line 108 of file OsiData2.hpp.

◆ getRowUpper() [2/2]

const double* OsiData::getRowUpper ( ) const
inline

Get rowUpper.

Definition at line 113 of file OsiData2.hpp.

◆ getRowRhs() [2/2]

const double* OsiData::getRowRhs ( ) const
inline

Set rowRhs to point on a vector holding the right hand side of the constraints (for a ranged constraint, it contains the upper bound).

Get rowRhs

Definition at line 119 of file OsiData2.hpp.

◆ getRowRange() [2/2]

const double* OsiData::getRowRange ( ) const
inline

Get rowRange.

Definition at line 121 of file OsiData2.hpp.

◆ getRowSense() [2/2]

const char* OsiData::getRowSense ( ) const
inline

Get rowSense.

Definition at line 123 of file OsiData2.hpp.

◆ getRowActivity() [2/2]

const double* OsiData::getRowActivity ( ) const
inline

Set rowActivity to point on a vector holding the activity of the constraints (i.e.

coefficient matrix times separateThis). Get rowActivity

Definition at line 129 of file OsiData2.hpp.

◆ setColType() [2/2]

virtual void OsiData::setColType ( const char *  givenColType)
inlinevirtual

Set colType to point on a vector holding the type of the variables ('B', 'I', or 'C' for Binary, Integer and Continuous)

Definition at line 133 of file OsiData2.hpp.

◆ getColType() [2/2]

const char* OsiData::getColType ( ) const
inline

Get colType.

Definition at line 138 of file OsiData2.hpp.

◆ setPrimalSol() [2/2]

virtual void OsiData::setPrimalSol ( const double *  givenPrimalSol)
inlinevirtual

Set primal solution.

Definition at line 141 of file OsiData2.hpp.

◆ getPrimalSol() [2/2]

const double* OsiData::getPrimalSol ( ) const
inline

Get primal solution.

Definition at line 146 of file OsiData2.hpp.

◆ initializeOtherData() [2/2]

void OsiData::initializeOtherData ( )
inline

initialize the non-const data

Definition at line 149 of file OsiData2.hpp.

◆ convertBoundToSense() [2/2]

void OsiData::convertBoundToSense ( const double  lower,
const double  upper,
char &  sense,
double &  right,
double &  range 
) const
inline

A quick inlined function to convert from the lb/ub style of constraint definition to the sense/rhs/range style.

Definition at line 169 of file OsiData2.hpp.

Member Data Documentation

◆ infinity

double OsiData::infinity
protected

Definition at line 252 of file OsiData.hpp.

◆ nrow

int OsiData::nrow
protected

Definition at line 255 of file OsiData.hpp.

◆ ncol

int OsiData::ncol
protected

Definition at line 258 of file OsiData.hpp.

◆ matrixByCol

CoinPackedMatrix const * OsiData::matrixByCol
protected

Definition at line 261 of file OsiData.hpp.

◆ matrixByRow

CoinPackedMatrix const * OsiData::matrixByRow
protected

Definition at line 264 of file OsiData.hpp.

◆ obj

const double * OsiData::obj
protected

Definition at line 267 of file OsiData.hpp.

◆ colLower

const double * OsiData::colLower
protected

Definition at line 270 of file OsiData.hpp.

◆ colUpper

const double * OsiData::colUpper
protected

Definition at line 273 of file OsiData.hpp.

◆ rowLower

const double * OsiData::rowLower
protected

Definition at line 276 of file OsiData.hpp.

◆ rowUpper

const double * OsiData::rowUpper
protected

Definition at line 279 of file OsiData.hpp.

◆ colType

const char * OsiData::colType
protected

Pointer on vector of characters for columns types.

colType[i] can have values

  • 'C' : continuous
  • 'B' : binary
  • 'I' : integer

Definition at line 289 of file OsiData.hpp.

◆ primalSol

const double * OsiData::primalSol
protected

Definition at line 292 of file OsiData.hpp.

◆ rowRhs

double * OsiData::rowRhs
protected

Definition at line 297 of file OsiData.hpp.

◆ rowRange

double * OsiData::rowRange
protected

Definition at line 300 of file OsiData.hpp.

◆ rowSense

char * OsiData::rowSense
protected

Definition at line 303 of file OsiData.hpp.

◆ rowActivity

double * OsiData::rowActivity
protected

Definition at line 307 of file OsiData.hpp.


The documentation for this class was generated from the following files: