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

a sparse matrix data structure for matrices that can hold nonconstant values and have block structure In addition it is assumed that all nesting of blocks has been resolved. More...

#include <OSMatrix.h>

Collaboration diagram for ExpandedMatrixBlocks:
Collaboration graph
[legend]

Public Member Functions

 ExpandedMatrixBlocks ()
 Default constructor. More...
 
 ExpandedMatrixBlocks (bool isColumnMajor_, int startSize, int valueSize)
 Alternate constructor. More...
 
 ~ExpandedMatrixBlocks ()
 Default destructor. More...
 
bool display (int secondaryDim)
 This method displays data structure in the matrix format. More...
 
GeneralSparseMatrixgetBlock (int rowIdx, int colIdx)
 a method to retrieve a particular block from a collection More...
 
bool isBlockDiagonal ()
 a method to determine whether the collection is blockDiagonal More...
 

Public Attributes

bool bDeleteArrays
 bDeleteArrays is true if we delete the arrays in garbage collection set to true by default More...
 
ENUM_MATRIX_TYPE vType
 vType holds the type of all (nonzero) values in the collection of blocks contained in this set of blocks. More...
 
bool isRowMajor
 isRowMajor holds whether the (nonzero) values holding the data are stored by columnrow. More...
 
int blockNumber
 blockNumber gives the number of blocks (which is the size of the blockRows and blockColumns arrays). More...
 
introwOffset
 rowOffset gives the row offsets of the block decomposition It does not have to correspond to the row offsets in the matrix's <blocks> element (indeed there does not have to be such an element at all, or there may be several, possibly incompatible). More...
 
intcolOffset
 colOffset gives the column offsets of the block decomposition It does not have to correspond to the column offsets in the matrix's <blocks> element (indeed there does not have to be such an element at all, or there may be several, possibly incompatible). More...
 
int rowOffsetSize
 These two parameters give the size of the rowOffset and colOffset arrays, respectively. More...
 
int colOffsetSize
 
intblockRows
 blockRows holds an integer array of the row to which a block belongs. More...
 
intblockColumns
 blockColumns holds an integer array of the column to which a block belongs. More...
 
GeneralSparseMatrix ** blocks
 blocks holds the blocks that make up the matrix. More...
 

Detailed Description

a sparse matrix data structure for matrices that can hold nonconstant values and have block structure In addition it is assumed that all nesting of blocks has been resolved.

Definition at line 1768 of file OSMatrix.h.

Constructor & Destructor Documentation

ExpandedMatrixBlocks::ExpandedMatrixBlocks ( )

Default constructor.

-------— Methods for class ExpandedMatrixBlocks -------—

Definition at line 6513 of file OSMatrix.cpp.

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

Alternate constructor.

Parameters
isColumnMajorholds whether the coefMatrix (AMatrix) holding linear program data 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.

Definition at line 6526 of file OSMatrix.cpp.

ExpandedMatrixBlocks::~ExpandedMatrixBlocks ( )

Default destructor.

Definition at line 6539 of file OSMatrix.cpp.

Member Function Documentation

bool ExpandedMatrixBlocks::display ( int  secondaryDim)

This method displays data structure in the matrix format.

Returns

Definition at line 6625 of file OSMatrix.cpp.

GeneralSparseMatrix * ExpandedMatrixBlocks::getBlock ( int  rowIdx,
int  colIdx 
)

a method to retrieve a particular block from a collection

Parameters
rowIdxis the row index of the block to be retrieved
colIdxis the column index of the block to be retrieved
Returns
a pointer to the block (as a GeneralSparseMatrix)

Definition at line 6595 of file OSMatrix.cpp.

bool ExpandedMatrixBlocks::isBlockDiagonal ( )

a method to determine whether the collection is blockDiagonal

Returns
whether the collection is blockDiagonal or not

Definition at line 6608 of file OSMatrix.cpp.

Member Data Documentation

bool ExpandedMatrixBlocks::bDeleteArrays

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

Definition at line 1775 of file OSMatrix.h.

ENUM_MATRIX_TYPE ExpandedMatrixBlocks::vType

vType holds the type of all (nonzero) values in the collection of blocks contained in this set of blocks.

Definition at line 1781 of file OSMatrix.h.

bool ExpandedMatrixBlocks::isRowMajor

isRowMajor holds whether the (nonzero) values holding the data are stored by columnrow.

If false, the matrix is stored by column.

Definition at line 1787 of file OSMatrix.h.

int ExpandedMatrixBlocks::blockNumber

blockNumber gives the number of blocks (which is the size of the blockRows and blockColumns arrays).

Definition at line 1793 of file OSMatrix.h.

int* ExpandedMatrixBlocks::rowOffset

rowOffset gives the row offsets of the block decomposition It does not have to correspond to the row offsets in the matrix's <blocks> element (indeed there does not have to be such an element at all, or there may be several, possibly incompatible).

Definition at line 1801 of file OSMatrix.h.

int* ExpandedMatrixBlocks::colOffset

colOffset gives the column offsets of the block decomposition It does not have to correspond to the column offsets in the matrix's <blocks> element (indeed there does not have to be such an element at all, or there may be several, possibly incompatible).

Definition at line 1809 of file OSMatrix.h.

int ExpandedMatrixBlocks::rowOffsetSize

These two parameters give the size of the rowOffset and colOffset arrays, respectively.

Definition at line 1814 of file OSMatrix.h.

int ExpandedMatrixBlocks::colOffsetSize

Definition at line 1815 of file OSMatrix.h.

int* ExpandedMatrixBlocks::blockRows

blockRows holds an integer array of the row to which a block belongs.

It must be of dimension blockNumber. It is assumed that all blocks in a row have the same number of rows (while the number of columns is allowed to vary).

Definition at line 1823 of file OSMatrix.h.

int* ExpandedMatrixBlocks::blockColumns

blockColumns holds an integer array of the column to which a block belongs.

It must be of dimension blockNumber. It is assumed that all blocks in a column have the same number of columns (while the number of rows is allowed to vary).

Definition at line 1831 of file OSMatrix.h.

GeneralSparseMatrix** ExpandedMatrixBlocks::blocks

blocks holds the blocks that make up the matrix.

All blocks have the same type of values, which corresponds to the most general form found, and the same row/column major form.

Definition at line 1838 of file OSMatrix.h.


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