166 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
212 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
268 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
322 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
360 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
400 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
438 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
452 class LinearMatrixNonzeros
471 LinearMatrixNonzeros();
472 ~LinearMatrixNonzeros();
477 bool IsEqual(LinearMatrixNonzeros *that);
487 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
494 bool deepCopyFrom(LinearMatrixNonzeros *that);
550 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
588 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
647 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
703 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
759 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
832 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
896 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
979 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1078 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1119 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1223 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1290 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
virtual std::string getNodeName()
bool rowMajor
To indicate whether the general matrix elements are stored in row major form or column major form...
bool deepCopyFrom(MatrixBlocks *that)
A function to make a deep copy of an instance of this class.
ObjReferenceMatrixElements * objReferenceElements
bool deepCopyFrom(BaseMatrix *that)
A function to make a deep copy of an instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int baseMatrixIdx
the index of the base matrix
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
ScalarExpressionTree ** el
a double vector data structure
bool deepCopyFrom(MatrixElements *that)
A function to make a deep copy of an instance of this class.
IntVector * indexes
The indexes of the (nonzero) linear matrix elements row or column indexes, depending on rowMajor...
bool IsEqual(MatrixBlocks *that)
A function to check for the equality of two objects.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(MatrixNode *that)
A function to make a deep copy of an instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
a data structure to represent the nonzeroes of a matrix explicitly element by element ...
bool rowMajor
To indicate whether the varReference matrix elements are stored in row major form or column major for...
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
a data structure to represent a MatrixType object (from which we derive OSMatrix and MatrixBlock) ...
ConstantMatrixElements * constantElements
virtual ~MatrixNode()
destructor
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
virtual std::string getMatrixNodeInXML()
int baseMatrixStartRow
to select the position of the upper left corner of the portion of the base matrix that is to be selec...
bool setMatrix(std::string name, int numberOfRows, int numberOfColumns, ENUM_MATRIX_SYMMETRY symmetry, ENUM_MATRIX_TYPE matrixType, unsigned int inumberOfChildren, MatrixNode **m_mChildren)
add values to this matrix.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
IntVector * indexes
The row (or column) indices and variable references of the elements.
a data structure to represent the linear expressions in a LinearMatrixElement object ...
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool rowMajor
To indicate whether the linear matrix elements are stored in row major form or column major form...
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
MatrixNode()
default constructor
bool deepCopyFrom(MatrixBlock *that)
A function to make a deep copy of an instance of this class.
bool deepCopyFrom(LinearMatrixValues *that)
A function to make a deep copy of an instance of this class.
virtual std::string getMatrixNodeInXML()
bool IsEqual(BaseMatrix *that)
A function to check for the equality of two objects.
LinearMatrixElements * linearElements
bool deepCopyFrom(VarReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
int numberOfBlocks
This integer gives the number of blocks for which values are provided Due to block-sparsity, this could be less than card(colOffsets)*card(rowOffsets)
virtual OSMatrix * cloneMatrixNode()
The implementation of the virtual functions.
ENUM_MATRIX_SYMMETRY symmetry
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(OSMatrix *that)
A function to make a deep copy of an instance of this class.
IntVector * indexes
The row (or column) indices and objective references of the elements.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
a data structure to represent the nonzero values in a linearMatrix element
virtual std::string getMatrixNodeInXML()
std::vector< MatrixNode * > getPrefixFromNodeTree()
~ObjReferenceMatrixElements()
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
virtual MatrixBlock * cloneMatrixNode()
The implementation of the virtual functions.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
ObjReferenceMatrixElements()
bool deepCopyFrom(ObjReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
LinearMatrixElementTerm ** varIdx
~ConstantMatrixElements()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
LinearMatrixElement ** el
bool IsEqual(LinearMatrixElement *that)
A function to check for the equality of two objects.
bool deepCopyFrom(ConstantMatrixElements *that)
A function to make a deep copy of an instance of this class.
IntVector * start
A vector listing the row or column starts.
virtual std::string getNodeName()
LinearMatrixValues * values
The values are expressions of the form a_0 + a_1 x_{i_1} * a_2 x_{i_2} + ...
ConReferenceMatrixElements * conReferenceElements
bool deepCopyFrom(LinearMatrixElementTerm *that)
A function to make a deep copy of an instance of this class.
Used to hold part of the instance in memory.
virtual std::string getNodeName()
virtual std::string getNodeName()=0
MatrixConstructor()
constructor
a data structure to represent constraint reference elements in a MatrixType object Each nonzero eleme...
bool rowMajor
To indicate whether the objReference matrix elements are stored in row major form or column major for...
bool rowMajor
To indicate whether the constant matrix elements are stored in row major form or column major form...
IntVector * indexes
The indices and values of the (nonzero) constant elements.
IntVector * start
A vector listing the row or column starts.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
IntVector * indexes
The indexes of the (nonzero) linear matrix elements row or column indexes, depending on rowMajor...
bool IsEqual(MatrixType *that)
A function to check for the equality of two objects.
MatrixBlock ** block
The nonzeros in each block are held in this data structure.
virtual std::string getNodeName()
LinearMatrixElementTerm()
a data structure to represent the nonzeroes of a matrix in a blockwise fashion.
unsigned int inumberOfChildren
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and Matri...
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...
virtual std::string getNodeName()
bool rowMajor
To indicate whether the conReference matrix elements are stored in row major form or column major for...
a data structure to represent the constant elements in a MatrixType object
virtual std::string getMatrixNodeInXML()
a data structure to represent variable reference elements in a MatrixType object Each nonzero element...
bool IsEqual(ObjReferenceMatrixElements *that)
A function to check for the equality of two objects.
OSMatrix * createConstructorTreeFromPrefix(std::vector< MatrixNode * > mtxConstructorVec)
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...
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
IntVector * start
A vector listing the row or column starts.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool IsEqual(GeneralMatrixElements *that)
A function to check for the equality of two objects.
bool deepCopyFrom(GeneralMatrixValues *that)
A function to make a deep copy of an instance of this class.
virtual bool IsEqual(MatrixNode *that)
A function to check for the equality of two objects.
an integer Vector data structure
IntVector * colOffsets
An array listing the leftmost column of each block within the larger matrix It is assumed that the bl...
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
bool deepCopyFrom(LinearMatrixElements *that)
A function to make a deep copy of an instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
a data structure to represent objective reference elements in a MatrixType object Each nonzero elemen...
MatrixElements * copyNodeAndDescendants()
make a copy of this node and all its descendants
virtual BaseMatrix * cloneMatrixNode()
The implementation of the virtual functions.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
ENUM_MATRIX_TYPE matrixType
matrixType tracks the type of elements contained in this MatrixNode, which may be useful in solver se...
bool IsEqual(MatrixElements *that)
A function to check for the equality of two objects.
bool deepCopyFrom(MatrixConstructor *that)
A function to make a deep copy of an instance of this class.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
bool IsEqual(MatrixConstructor *that)
A function to check for the equality of two objects.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
bool IsEqual(OSMatrix *that)
A function to check for the equality of two objects.
IntVector * start
A vector listing the row or column starts.
IntVector * start
A vector listing the row or column starts.
virtual std::string getMatrixNodeInXML()=0
GeneralMatrixElements * generalElements
IntVector * start
A vector listing the row or column starts.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
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...
bool deepCopyFrom(GeneralMatrixElements *that)
A function to make a deep copy of an instance of this class.
bool deepCopyFrom(MatrixType *that)
A function to make a deep copy of an instance of this class.
This file defines the OSnLNode class along with its derived classes.
bool deepCopyFrom(ConReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
VarReferenceMatrixElements()
std::vector< MatrixNode * > preOrderMatrixNodeTraversal(std::vector< MatrixNode * > *prefixVector)
virtual MatrixBlocks * cloneMatrixNode()
The implementation of the virtual functions.
bool IsEqual(ConReferenceMatrixElements *that)
A function to check for the equality of two objects.
GeneralMatrixValues * values
The values are general nonlinear expressions.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
IntVector * indexes
The row (or column) indices and constraint references of the elements.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(LinearMatrixElement *that)
A function to make a deep copy of an instance of this class.
bool IsEqual(LinearMatrixValues *that)
A function to check for the equality of two objects.
~VarReferenceMatrixElements()
a data structure to represent the nonzero values in a generalMatrix element
a data structure to represent a MatrixBlock object (derived from MatrixType)
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool IsEqual(GeneralMatrixValues *that)
A function to check for the equality of two objects.
bool IsEqual(LinearMatrixElementTerm *that)
A function to check for the equality of two objects.
virtual MatrixElements * cloneMatrixNode()
The implementation of the virtual functions.
std::vector< MatrixNode * > getPostfixFromNodeTree()
~LinearMatrixElementTerm()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
a data structure to represent a matrix object (derived from MatrixType)
virtual ~MatrixElements()
IntVector * rowOffsets
An array listing the top row of each block within the larger matrix.
bool IsEqual(ConstantMatrixElements *that)
A function to check for the equality of two objects.
bool baseTranspose
to allow the base matrix to be transposed before it is attached to the target matrix ...
virtual std::string getMatrixNodeInXML()
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
~ConReferenceMatrixElements()
std::vector< MatrixNode * > postOrderMatrixNodeTraversal(std::vector< MatrixNode * > *postfixVector)
ConReferenceMatrixElements()
VarReferenceMatrixElements * varReferenceElements
bool IsEqual(VarReferenceMatrixElements *that)
A function to check for the equality of two objects.
virtual MatrixNode * cloneMatrixNode()=0
int targetMatrixFirstRow
to pinpoint the position of the upper left corner of the base matrix within the target matrix ...
bool IsEqual(LinearMatrixElements *that)
A function to check for the equality of two objects.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
The OSnLNode Class for nonlinear expressions.
bool IsEqual(MatrixBlock *that)
A function to check for the equality of two objects.
~MatrixConstructor()
destructor