#include <OSGeneral.h>
Public Member Functions | |
SparseMatrix () | |
Default constructor. | |
SparseMatrix (bool isColumnMajor_, int startSize, int valueSize) | |
Constructor. | |
~SparseMatrix () | |
Default destructor. | |
bool | display (int secondaryDim) |
This method displays data structure in the matrix format. | |
Public Attributes | |
bool | bDeleteArrays |
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default | |
bool | isColumnMajor |
isColumnMajor holds whether the coefMatrix (AMatrix) holding linear program data is stored by column. | |
int | startSize |
startSize is the dimension of the starts array | |
int | valueSize |
valueSize is the dimension of the starts array | |
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). | |
int * | indexes |
indexes holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix). | |
double * | values |
values holds a double array of value elements in coefMatrix (AMatrix), which contains nonzero elements. |
Definition at line 40 of file OSGeneral.h.
SparseMatrix::SparseMatrix | ( | ) |
SparseMatrix::SparseMatrix | ( | bool | isColumnMajor_, | |
int | startSize, | |||
int | valueSize | |||
) |
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 79 of file OSGeneral.cpp.
References bDeleteArrays, indexes, starts, startSize, values, and valueSize.
SparseMatrix::~SparseMatrix | ( | ) |
Default destructor.
Definition at line 92 of file OSGeneral.cpp.
References bDeleteArrays, indexes, starts, and values.
bool SparseMatrix::display | ( | int | secondaryDim | ) |
This method displays data structure in the matrix format.
Definition at line 108 of file OSGeneral.cpp.
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default
Definition at line 47 of file OSGeneral.h.
Referenced by OSInstance::processLinearConstraintCoefficients(), SparseMatrix(), and ~SparseMatrix().
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 53 of file OSGeneral.h.
Referenced by OSInstance::processLinearConstraintCoefficients().
startSize is the dimension of the starts array
Definition at line 58 of file OSGeneral.h.
Referenced by OSMatlab::createOSInstance(), display(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OSInstance::processLinearConstraintCoefficients(), and SparseMatrix().
valueSize is the dimension of the starts array
Definition at line 63 of file OSGeneral.h.
Referenced by OSMatlab::createOSInstance(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OSInstance::processLinearConstraintCoefficients(), and SparseMatrix().
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 69 of file OSGeneral.h.
Referenced by CouenneSolver::buildSolverInstance(), MathUtil::convertLinearConstraintCoefficientMatrixToTheOtherMajor(), OSMatlab::createOSInstance(), LindoSolver::dataEchoCheck(), KnitroSolver::dataEchoCheck(), BonminSolver::dataEchoCheck(), display(), LindoSolver::generateLindoModel(), OS_DipInterface::getBlockConstraintIndexes(), OS_DipInterface::getBlockOSInstances(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OS_DipInterface::getRow(), OSRouteSolver::getSeparationInstance(), OS_tm::initialize_core(), OSInstance::printModel(), OSInstance::processLinearConstraintCoefficients(), OS_DipInterface::readOSiL(), CoinSolver::setCoinPackedMatrix(), SparseMatrix(), and ~SparseMatrix().
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 75 of file OSGeneral.h.
Referenced by CouenneSolver::buildSolverInstance(), MathUtil::convertLinearConstraintCoefficientMatrixToTheOtherMajor(), OSMatlab::createOSInstance(), LindoSolver::dataEchoCheck(), KnitroSolver::dataEchoCheck(), BonminSolver::dataEchoCheck(), display(), LindoSolver::generateLindoModel(), OS_DipInterface::getBlockConstraintIndexes(), OS_DipInterface::getBlockOSInstances(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OS_DipInterface::getRow(), OSRouteSolver::getSeparationInstance(), OS_tm::initialize_core(), OSInstance::printModel(), OSInstance::processLinearConstraintCoefficients(), OS_DipInterface::readOSiL(), CoinSolver::setCoinPackedMatrix(), SparseMatrix(), and ~SparseMatrix().
double* SparseMatrix::values |
values holds a double array of value elements in coefMatrix (AMatrix), which contains nonzero elements.
Definition at line 81 of file OSGeneral.h.
Referenced by CouenneSolver::buildSolverInstance(), MathUtil::convertLinearConstraintCoefficientMatrixToTheOtherMajor(), OSMatlab::createOSInstance(), LindoSolver::dataEchoCheck(), KnitroSolver::dataEchoCheck(), BonminSolver::dataEchoCheck(), LindoSolver::generateLindoModel(), OS_DipInterface::getBlockOSInstances(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OS_DipInterface::getRow(), OSRouteSolver::getSeparationInstance(), OS_tm::initialize_core(), OSInstance::printModel(), OSInstance::processLinearConstraintCoefficients(), OS_DipInterface::readOSiL(), CoinSolver::setCoinPackedMatrix(), SparseMatrix(), and ~SparseMatrix().