a sparse matrix data structure for matrices that can hold nonconstant values More...
#include <OSMatrix.h>
Public Member Functions | |
GeneralSparseMatrix () | |
Default constructor. More... | |
GeneralSparseMatrix (bool isColumnMajor, int startSize, int valueSize, ENUM_MATRIX_TYPE type) | |
Alternate constructor. More... | |
~GeneralSparseMatrix () | |
Default destructor. More... | |
bool | display (int secondaryDim) |
This method displays the data contained in the matrix. More... | |
bool | isDiagonal () |
a method to determine whether the matrix is diagonal More... | |
Public Attributes | |
bool | b_deleteStartArray |
b_deleteStartArray is true if we delete the start array in garbage collection — set to true by default More... | |
bool | b_deleteIndexArray |
b_deleteIndexArray is true if we delete the index array in garbage collection — set to true by default More... | |
bool | b_deleteValueArray |
b_deleteValueArray is true if we delete the value array in garbage collection — set to true by default More... | |
bool | isRowMajor |
isRowMajor holds whether the matrix is stored by row. More... | |
ENUM_MATRIX_SYMMETRY | symmetry |
To track the type of symmetry present in the matrix or block. More... | |
int | startSize |
startSize is the dimension of the starts array More... | |
int | valueSize |
valueSize is the dimension of the index and value arrays More... | |
int * | start |
start holds an integer array of start elements in the matrix, which points to the start of a column (row) of nonzero elements. More... | |
int * | index |
index holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix). More... | |
ENUM_MATRIX_TYPE | vType |
vType holds the type of values found in the value array. More... | |
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. More... | |
a sparse matrix data structure for matrices that can hold nonconstant values
Definition at line 1654 of file OSMatrix.h.
GeneralSparseMatrix::GeneralSparseMatrix | ( | ) |
Default constructor.
-------— Methods for class GeneralSparseMatrix -------—
Definition at line 6393 of file OSMatrix.cpp.
GeneralSparseMatrix::GeneralSparseMatrix | ( | bool | isColumnMajor, |
int | startSize, | ||
int | valueSize, | ||
ENUM_MATRIX_TYPE | type | ||
) |
Alternate constructor.
isColumnMajor | holds whether the matrix is stored by column. If false, the matrix is stored by row. |
startSize | holds the size of the start array. |
valueSize | holds the size of the value and index arrays. |
type | describes the type of values held in the matrix (see OSParameters.h). |
Definition at line 6410 of file OSMatrix.cpp.
GeneralSparseMatrix::~GeneralSparseMatrix | ( | ) |
Default destructor.
Definition at line 6428 of file OSMatrix.cpp.
bool GeneralSparseMatrix::display | ( | int | secondaryDim | ) |
This method displays the data contained in the matrix.
Definition at line 6506 of file OSMatrix.cpp.
bool GeneralSparseMatrix::isDiagonal | ( | ) |
a method to determine whether the matrix is diagonal
Definition at line 6483 of file OSMatrix.cpp.
bool GeneralSparseMatrix::b_deleteStartArray |
b_deleteStartArray is true if we delete the start array in garbage collection — set to true by default
Definition at line 1662 of file OSMatrix.h.
bool GeneralSparseMatrix::b_deleteIndexArray |
b_deleteIndexArray is true if we delete the index array in garbage collection — set to true by default
Definition at line 1668 of file OSMatrix.h.
bool GeneralSparseMatrix::b_deleteValueArray |
b_deleteValueArray is true if we delete the value array in garbage collection — set to true by default
Definition at line 1674 of file OSMatrix.h.
bool GeneralSparseMatrix::isRowMajor |
isRowMajor holds whether the matrix is stored by row.
If false, the matrix is stored by column (which is the default).
Definition at line 1680 of file OSMatrix.h.
ENUM_MATRIX_SYMMETRY GeneralSparseMatrix::symmetry |
To track the type of symmetry present in the matrix or block.
Definition at line 1686 of file OSMatrix.h.
int GeneralSparseMatrix::startSize |
startSize is the dimension of the starts array
Definition at line 1691 of file OSMatrix.h.
int GeneralSparseMatrix::valueSize |
valueSize is the dimension of the index and value arrays
Definition at line 1696 of file OSMatrix.h.
int* GeneralSparseMatrix::start |
start holds an integer array of start elements in the matrix, which points to the start of a column (row) of nonzero elements.
Definition at line 1702 of file OSMatrix.h.
int* GeneralSparseMatrix::index |
index holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix).
If the matrix is stored by column (row), rowIdx (colIdx) is the array of row (column) indices.
Definition at line 1708 of file OSMatrix.h.
ENUM_MATRIX_TYPE GeneralSparseMatrix::vType |
vType holds the type of values found in the value array.
Definition at line 1714 of file OSMatrix.h.
MatrixElementValues* GeneralSparseMatrix::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.
If mixed types are encountered (e.g., constant and nonlinear expression), they are converted to the most general form found.
Definition at line 1723 of file OSMatrix.h.