SparseMatrix Class Reference

a sparse matrix data structure More...

#include <OSGeneral.h>

List of all members.

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.


Detailed Description

a sparse matrix data structure

Definition at line 155 of file OSGeneral.h.


Constructor & Destructor Documentation

SparseMatrix::SparseMatrix (  ) 

Default constructor.

Definition at line 149 of file OSGeneral.cpp.

SparseMatrix::SparseMatrix ( bool  isColumnMajor_,
int  startSize,
int  valueSize 
)

Constructor.

Parameters:
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 162 of file OSGeneral.cpp.

References bDeleteArrays, indexes, starts, startSize, values, and valueSize.

SparseMatrix::~SparseMatrix (  ) 

Default destructor.

Definition at line 175 of file OSGeneral.cpp.

References bDeleteArrays, indexes, starts, and values.


Member Function Documentation

bool SparseMatrix::display ( int  secondaryDim  ) 

This method displays data structure in the matrix format.

Returns:

Definition at line 193 of file OSGeneral.cpp.

References indexes, k, starts, and startSize.


Member Data Documentation

bool SparseMatrix::bDeleteArrays

bDeleteArrays is true if we delete the arrays in garbage collection set to true by default

Definition at line 163 of file OSGeneral.h.

Referenced by getConstraintMatrix(), OSInstance::processLinearConstraintCoefficients(), SparseMatrix(), and ~SparseMatrix().

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 169 of file OSGeneral.h.

Referenced by getConstraintMatrix(), and OSInstance::processLinearConstraintCoefficients().

int SparseMatrix::startSize

startSize is the dimension of the starts array

Definition at line 174 of file OSGeneral.h.

Referenced by OSMatlab::createOSInstance(), display(), getConstraintMatrix(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OSInstance::processLinearConstraintCoefficients(), and SparseMatrix().

int SparseMatrix::valueSize

valueSize is the dimension of the starts array

Definition at line 179 of file OSGeneral.h.

Referenced by OSMatlab::createOSInstance(), getConstraintMatrix(), 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 185 of file OSGeneral.h.

Referenced by CouenneSolver::buildSolverInstance(), MathUtil::convertLinearConstraintCoefficientMatrixToTheOtherMajor(), OSMatlab::createOSInstance(), LindoSolver::dataEchoCheck(), KnitroSolver::dataEchoCheck(), IpoptSolver::dataEchoCheck(), BonminSolver::dataEchoCheck(), display(), LindoSolver::generateLindoModel(), OS_DipInterface::getBlockConstraintIndexes(), OS_DipInterface::getBlockOSInstances(), getConstraintMatrix(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OS_DipInterface::getRow(), OSBearcatSolverXkij::getSeparationInstance(), OSBearcatSolverXij::getSeparationInstance(), OS_tm::initialize_core(), main(), OSInstance::printModel(), OSInstance::processLinearConstraintCoefficients(), OS_DipInterface::readOSiL(), CoinSolver::setCoinPackedMatrix(), SparseMatrix(), and ~SparseMatrix().

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 191 of file OSGeneral.h.

Referenced by CouenneSolver::buildSolverInstance(), MathUtil::convertLinearConstraintCoefficientMatrixToTheOtherMajor(), OSMatlab::createOSInstance(), LindoSolver::dataEchoCheck(), KnitroSolver::dataEchoCheck(), IpoptSolver::dataEchoCheck(), BonminSolver::dataEchoCheck(), display(), LindoSolver::generateLindoModel(), OS_DipInterface::getBlockConstraintIndexes(), OS_DipInterface::getBlockOSInstances(), getConstraintMatrix(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OS_DipInterface::getRow(), OSBearcatSolverXkij::getSeparationInstance(), OSBearcatSolverXij::getSeparationInstance(), OS_tm::initialize_core(), main(), 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 197 of file OSGeneral.h.

Referenced by CouenneSolver::buildSolverInstance(), MathUtil::convertLinearConstraintCoefficientMatrixToTheOtherMajor(), OSMatlab::createOSInstance(), LindoSolver::dataEchoCheck(), KnitroSolver::dataEchoCheck(), IpoptSolver::dataEchoCheck(), BonminSolver::dataEchoCheck(), LindoSolver::generateLindoModel(), OS_DipInterface::getBlockOSInstances(), getConstraintMatrix(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OS_DipInterface::getRow(), OSBearcatSolverXkij::getSeparationInstance(), OSBearcatSolverXij::getSeparationInstance(), OS_tm::initialize_core(), main(), OSInstance::printModel(), OSInstance::processLinearConstraintCoefficients(), OS_DipInterface::readOSiL(), CoinSolver::setCoinPackedMatrix(), SparseMatrix(), and ~SparseMatrix().


The documentation for this class was generated from the following files:
Generated on Wed Nov 30 03:12:18 2011 by  doxygen 1.4.7