a sparse matrix data structure More...
#include <OSGeneral.h>
Public Member Functions | |
SparseMatrix () | |
Default constructor. More... | |
SparseMatrix (bool isColumnMajor_, int startSize, int valueSize) | |
Constructor. More... | |
~SparseMatrix () | |
Default destructor. More... | |
bool | display (int secondaryDim) |
This method displays data structure in the matrix format. More... | |
Public Attributes | |
bool | bDeleteArrays |
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default More... | |
bool | isColumnMajor |
isColumnMajor holds whether the coefMatrix (AMatrix) holding linear program data is stored by column. More... | |
int | startSize |
startSize is the dimension of the starts array More... | |
int | valueSize |
valueSize is the dimension of the indexes and values arrays More... | |
int * | starts |
starts holds an integer array of start elements in coefMatrix (AMatrix), which points to the start of a column (row) of nonzero elements in coefMatrix (AMatrix). More... | |
int * | indexes |
indexes holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix). More... | |
double * | values |
values holds a double array of value elements in coefMatrix (AMatrix), which contains nonzero elements. More... | |
a sparse matrix data structure
Definition at line 223 of file OSGeneral.h.
SparseMatrix::SparseMatrix | ( | ) |
Default constructor.
Definition at line 215 of file OSGeneral.cpp.
Constructor.
isColumnMajor | holds whether the coefMatrix (AMatrix) holding linear program data 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. |
Definition at line 228 of file OSGeneral.cpp.
SparseMatrix::~SparseMatrix | ( | ) |
Default destructor.
Definition at line 241 of file OSGeneral.cpp.
bool SparseMatrix::display | ( | int | secondaryDim | ) |
This method displays data structure in the matrix format.
Definition at line 258 of file OSGeneral.cpp.
bool SparseMatrix::bDeleteArrays |
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default
Definition at line 230 of file OSGeneral.h.
bool SparseMatrix::isColumnMajor |
isColumnMajor holds whether the coefMatrix (AMatrix) holding linear program data is stored by column.
If false, the matrix is stored by row.
Definition at line 236 of file OSGeneral.h.
int SparseMatrix::startSize |
startSize is the dimension of the starts array
Definition at line 241 of file OSGeneral.h.
int SparseMatrix::valueSize |
valueSize is the dimension of the indexes and values arrays
Definition at line 246 of file OSGeneral.h.
int* SparseMatrix::starts |
starts holds an integer array of start elements in coefMatrix (AMatrix), which points to the start of a column (row) of nonzero elements in coefMatrix (AMatrix).
Definition at line 252 of file OSGeneral.h.
int* SparseMatrix::indexes |
indexes 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 258 of file OSGeneral.h.
double* SparseMatrix::values |
values holds a double array of value elements in coefMatrix (AMatrix), which contains nonzero elements.
Definition at line 264 of file OSGeneral.h.