Public Member Functions | Public Attributes | List of all members
GeneralSparseMatrix Class Reference

a sparse matrix data structure for matrices that can hold nonconstant values More...

#include <OSMatrix.h>

Collaboration diagram for GeneralSparseMatrix:
Collaboration graph
[legend]

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...
 
intstart
 start holds an integer array of start elements in the matrix, which points to the start of a column (row) of nonzero elements. More...
 
intindex
 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...
 
MatrixElementValuesvalue
 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...
 

Detailed Description

a sparse matrix data structure for matrices that can hold nonconstant values

Definition at line 1654 of file OSMatrix.h.

Constructor & Destructor Documentation

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.

Parameters
isColumnMajorholds whether the matrix is stored by column. If false, the matrix is stored by row.
startSizeholds the size of the start array.
valueSizeholds the size of the value and index arrays.
typedescribes 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.

Member Function Documentation

bool GeneralSparseMatrix::display ( int  secondaryDim)

This method displays the data contained in the matrix.

Returns

Definition at line 6506 of file OSMatrix.cpp.

bool GeneralSparseMatrix::isDiagonal ( )

a method to determine whether the matrix is diagonal

Returns
whether the matrix is diagonal or not

Definition at line 6483 of file OSMatrix.cpp.

Member Data Documentation

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.

Remarks
for definitions, see OSParameters.h

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.

Remarks
See OSParameters.h for a list of possible types

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.


The documentation for this class was generated from the following files: