186 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
304 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
395 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
435 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
487 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
548 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
588 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
625 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
661 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
697 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
735 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
820 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
903 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
991 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1076 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1162 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1248 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1343 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1432 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1521 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1639 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1752 bool display(
int secondaryDim);
1867 bool display(
int secondaryDim);
1881 bool isBlockDiagonal();
1919 int* m_miRowPartition;
1924 int m_iRowPartitionSize;
1929 int* m_miColumnPartition;
1934 int m_iColumnPartitionSize;
1939 bool m_bHaveRowPartition;
1944 bool m_bHaveColumnPartition;
1970 bool matrixHasBase();
1971 bool matrixHasElements();
1972 bool matrixHasTransformations();
1973 bool matrixHasBlocks();
1974 int getNumberOfElementConstructors();
1975 int getNumberOfTransformationConstructors();
1976 int getNumberOfBlocksConstructors();
1988 bool printExpandedMatrix(
bool rowMajor);
1997 int getRowPartitionSize();
2005 int* getRowPartition();
2014 int getColumnPartitionSize();
2022 int* getColumnPartition();
2034 virtual bool expandElements(
bool rowMajor);
2057 bool processBlockPartition();
2091 virtual bool processBlocks(
int* rowOffset,
int rowOffsetSize,
int* colOffset,
2137 int* colPartition,
int colPartitionSize,
2138 bool rowMajor,
bool appendToBlockArray);
2153 int* colPartition,
int colPartitionSize,
2169 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
2205 OSMatrix* createConstructorTreeFromPrefix(std::vector<MatrixNode*> mtxConstructorVec);
2248 virtual bool expandElements(
bool rowMajor);
2264 bool isBlockDiagonal();
2285 bool setMatrix(std::string name,
int numberOfRows,
int numberOfColumns,
2321 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
2376 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
2431 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
2485 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
2555 virtual bool expandElements(
bool rowMajor);
2578 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
virtual ENUM_MATRIX_TYPE getMatrixType()=0
int baseMatrixIdx
the index of the base matrix
int * index
index holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix).
ScalarExpressionTree ** el
double value
This element contains the value.
ENUM_CONREFERENCE_VALUETYPE valueType
Several different types of values can be derived from a problem constraint.
bool deepCopyFrom(MatrixNode *that)
A function to make a deep copy of an instance of this class.
int numberOfEl
each type of value is stored as an array named "el".
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
The OSnLMNode Class for nonlinear expressions involving matrices.
double scalarMultiplier
to allow the base matrix to be scaled before it is attached to the target matrix
int conReference
contains a reference to a row of the problem (objective if negative, constraint otherwise) ...
a data structure to represent a MatrixType object (from which we derive OSMatrix and MatrixBlock) ...
virtual ~MatrixNode()
destructor
ConstantMatrixValues * value
The value array of the (nonzero) constant elements.
int * el
Each el is a reference to a constraint defined in the <constraints> section of the OSiL file...
MatrixElementValues * value
value holds a general array of value elements in the matrix, which could be constants, linear expressions, general nonlinear expressions, variable, constraint or objective references, etc.
int rowOffsetSize
These two parameters give the size of the rowOffset and colOffset arrays, respectively.
a sparse matrix data structure for matrices that can hold nonconstant values
bool isRowMajor
isRowMajor holds whether the (nonzero) values holding the data are stored by columnrow.
int baseMatrixStartRow
to select the position of the upper left corner of the portion of the base matrix that is to be selec...
int * start
start holds an integer array of start elements in the matrix, which points to the start of a column (...
IntVector * index
The index array of the (nonzero) elements.
a data structure to represent the linear expressions in a LinearMatrixElement object ...
ConReferenceMatrixElement * convertToConReferenceMatrixElement(int objref)
IntVector * start
A vector listing the row or column starts.
ScalarExpressionTree * convertToGeneralMatrixElement(double val)
to represent the nonzeros in an objReferenceMatrix element
VarReferenceMatrixValues * value
The variable references (indexes of core variables) of the elements.
MatrixNode()
default constructor
to represent the nonzeros in a constantMatrix element
A concrete class that is used to store a specific type of matrix values, references to variable index...
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)=0
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor...
ENUM_MATRIX_SYMMETRY symmetry
To track the type of symmetry present in the matrix or block.
ConReferenceMatrixValues * value
The row references (indexes of core rows plus value type) of the elements.
this class extends OSMatrix for use, e.g., in the matrixObj section of OSoL and OSrL ...
ENUM_MATRIX_TYPE vType
vType holds the type of values found in the value array.
ENUM_CONREFERENCE_VALUETYPE
An enum to track the type of value contained in a reference to a constraint.
bool b_deleteIndexArray
b_deleteIndexArray is true if we delete the index array in garbage collection — set to true by defa...
int * rowOffset
rowOffset gives the row offsets of the block decomposition It does not have to correspond to the row ...
a data structure to represent the nonzero values in a linearMatrix element
std::vector< MatrixNode * > getPrefixFromNodeTree()
int startSize
startSize is the dimension of the starts array
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL ...
a data structure to represent row reference elements in a MatrixType object Each nonzero element refe...
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
GeneralSparseMatrix * ExpandedMatrixInRowMajorForm
The matrix can be held in expanded form by rows or by columns and in a number of ways stored by block...
OSMatrix * baseMatrix
a pointer to the base matrix
LinearMatrixElementTerm ** varIdx
ConReferenceMatrixValues * value
The constraint references (indexes of core constraints and value types) of the elements.
LinearMatrixElement ** el
ObjReferenceMatrixValues * value
The objective references (indexes of core objectives) of the elements.
int valueSize
valueSize is the dimension of the index and value arrays
Used to hold part of the instance in memory.
virtual std::string getNodeName()=0
LinearMatrixValues * value
The values are expressions of the form a_0 + a_1 x_{i_1} * a_2 x_{i_2} + ...
a data structure to represent row reference elements in a MatrixType object Each nonzero element is o...
std::vector< MatrixNode * > postOrderMatrixNodeTraversal(std::vector< MatrixNode *> *postfixVector)
ENUM_MATRIX_TYPE vType
vType holds the type of all (nonzero) values in the collection of blocks contained in this set of blo...
this class extends OSMatrix for use, e.g., in the matrixCon section of OSoL and OSrL ...
a data structure to represent the nonzeroes of a matrix in a blockwise fashion.
int * blockRows
blockRows holds an integer array of the row to which a block belongs.
unsigned int inumberOfChildren
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and Matri...
int blockNumber
blockNumber gives the number of blocks (which is the size of the blockRows and blockColumns arrays)...
GeneralSparseMatrix * ExpandedMatrixInColumnMajorForm
int baseMatrixEndRow
to select the position of the lower right corner of the portion of the base matrix that is to be sele...
MatrixNode ** m_mChildren
m_mChildren holds all the children, that is, nodes used in the definition or construction of the curr...
a data structure to represent the constant elements in a MatrixType object
a data structure to represent the nonzeros in a conReferenceMatrix element
a data structure to represent variable reference elements in a MatrixType object Each nonzero element...
a data structure to represent a point of departure for constructing a matrix by modifying parts of a ...
a data structure to represent the nonzeros in a generalMatrix element
a data structure to represent an expression in a linearMatrix element A LinearMatrixElement is a (fin...
a data structure to represent an entry in a conReferenceMatrix element, which consists of a constrain...
virtual bool IsEqual(MatrixNode *that)
A function to check for the equality of two objects.
ENUM_MATRIX_SYMMETRY symmetry
To track the type of symmetry present in the matrix or block.
an integer Vector data structure
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
std::vector< ExpandedMatrixBlocks * > ExpandedMatrixByBlocks
a data structure to represent objective reference elements in a MatrixType object Each nonzero elemen...
ENUM_MATRIX_TYPE matrixType
matrixType tracks the type of elements contained in this MatrixNode, which may be useful in solver se...
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
virtual std::string getMatrixNodeInXML()=0
a sparse matrix data structure for matrices that can hold nonconstant values and have block structure...
bool isRowMajor
isRowMajor holds whether the matrix is stored by row.
ENUM_MATRIX_CONSTRUCTOR_TYPE
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
This file defines the OSnLNode class along with its derived classes.
int * colOffset
colOffset gives the column offsets of the block decomposition It does not have to correspond to the c...
LinearMatrixElement * convertToLinearMatrixElement(double val)
Some methods to convert one type of matrix element into another.
bool b_deleteValueArray
b_deleteValueArray is true if we delete the value array in garbage collection — set to true by defa...
bool rowMajor
To indicate whether the matrix elements are stored in row major form or column major form...
int * blockColumns
blockColumns holds an integer array of the column to which a block belongs.
IntVector * rowOffset
An array listing the top row of each block within the larger matrix.
bool b_deleteStartArray
b_deleteStartArray is true if we delete the start array in garbage collection — set to true by defa...
IntVector * colOffset
An array listing the leftmost column of each block within the larger matrix It is assumed that the bl...
GeneralMatrixValues * value
The values are general nonlinear expressions.
a data structure to represent the nonzero values in a generalMatrix element
a data structure to represent a MatrixBlock object (derived from MatrixType)
ENUM_MATRIX_TYPE type
To track the type of values present in the matrix or block.
std::vector< MatrixNode * > getPostfixFromNodeTree()
a data structure to represent a matrix object (derived from MatrixType)
std::vector< MatrixNode * > preOrderMatrixNodeTraversal(std::vector< MatrixNode *> *prefixVector)
bool baseTranspose
to allow the base matrix to be transposed before it is attached to the target matrix ...
a data structure to describe one step in the construction of a matrix.
a data structure to represent a term in a linearMatrix element A term has the form c*x_{k}...
ENUM_MATRIX_CONSTRUCTOR_TYPE nType
nType is a unique integer assigned to each type of matrix node (see OSParameters.h) ...
GeneralSparseMatrix ** blocks
blocks holds the blocks that make up the matrix.
bool bDeleteArrays
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default ...
ConReferenceMatrixElement ** el
el contains the indices of the matrix constraints along with the valueType.
virtual MatrixNode * cloneMatrixNode()=0
int targetMatrixFirstRow
to pinpoint the position of the upper left corner of the base matrix within the target matrix ...
The OSnLNode Class for nonlinear expressions.