Isis 3.0
Back | Home
Isis::SparseBlockColumnMatrix Class Reference

SparseBlockColumnMatrix. More...

#include <SparseBlockMatrix.h>

Inherits QMap< int, LinearAlgebra::Matrix * >.

Public Member Functions

 SparseBlockColumnMatrix ()
 
 ~SparseBlockColumnMatrix ()
 Destructor. More...
 
 SparseBlockColumnMatrix (const SparseBlockColumnMatrix &src)
 Copy constructor. More...
 
SparseBlockColumnMatrixoperator= (const SparseBlockColumnMatrix &src)
 "Equals" operator. More...
 
void wipe ()
 Deletes all pointer elements and removes them from the map. More...
 
void copy (const SparseBlockColumnMatrix &src)
 Copy method. More...
 
void zeroBlocks ()
 Sets all elements of all matrix blocks to zero. More...
 
bool insertMatrixBlock (int nColumnBlock, int nRows, int nCols)
 Inserts a "newed" LinearAlgebra::Matrix pointer of size (nRows, nCols) into the map with the block column number as key. More...
 
int numberOfElements ()
 Returns total number of matrix elements in map (NOTE: NOT the number of matrix blocks). More...
 
int numberOfRows ()
 Returns total number of rows in map (this needs to be clarified and maybe rewritten). More...
 
int numberOfColumns ()
 Returns total number of columns in map (NOTE: NOT the number of matrix blocks). More...
 
void print (std::ostream &outstream)
 Prints matrix blocks to std output stream out for debugging. More...
 
void printClean (std::ostream &outstream)
 Prints matrix blocks to std output stream out for debugging. More...
 

Detailed Description

SparseBlockColumnMatrix.

The SparseBlockMatrix class is a QList of SparseBlockColumnMatrix objects. Each SparseBlockColumnMatrix is a QMap of square matrix blocks and represents a column of square matrix blocks in the reduced normal equations matrix. The key into each column map is the block's row index. The value at each key is a square dense matrix (Boost matrix) with a dimension equivalent to the number of exterior orientation parameters used for the image. Zero blocks are not stored.

Author
2011-07-29 Ken Edmundson

Constructor & Destructor Documentation

Isis::SparseBlockColumnMatrix::SparseBlockColumnMatrix ( )
inline
Isis::SparseBlockColumnMatrix::~SparseBlockColumnMatrix ( )

Destructor.

See description of wipe method below.

Isis::SparseBlockColumnMatrix::SparseBlockColumnMatrix ( const SparseBlockColumnMatrix src)

Copy constructor.

Calls copy method immediately below.

Parameters
srcSparseBlockColumnMatrix to copy

Member Function Documentation

void Isis::SparseBlockColumnMatrix::copy ( const SparseBlockColumnMatrix src)

Copy method.

Parameters
srcSparseBlockColumnMatrix to copy
bool Isis::SparseBlockColumnMatrix::insertMatrixBlock ( int  nColumnBlock,
int  nRows,
int  nCols 
)

Inserts a "newed" LinearAlgebra::Matrix pointer of size (nRows, nCols) into the map with the block column number as key.

The clear call initializes the matrix elements to zero. If an entry exists at the key nColumnBlock, no insertion is made.

Parameters
nColumnBlockblock column number of inserted matrix (key into map)
nRowsnumber of rows in matrix to be inserted
nColsnumber of columns in matrix to be inserted
Returns
bool Returns true if insertion is successful or if block already exists at nColumnBlock Returns false if attempt to allocate new block fails

Referenced by Isis::operator>>().

int Isis::SparseBlockColumnMatrix::numberOfColumns ( )

Returns total number of columns in map (NOTE: NOT the number of matrix blocks).

Returns
int Total number of columns in SparseBlockColumnMatrix
int Isis::SparseBlockColumnMatrix::numberOfElements ( )

Returns total number of matrix elements in map (NOTE: NOT the number of matrix blocks).

The sum of all the elements in all of the matrix blocks.

Returns
int Total number of matrix elements in SparseBlockColumnMatrix
int Isis::SparseBlockColumnMatrix::numberOfRows ( )

Returns total number of rows in map (this needs to be clarified and maybe rewritten).

It's the number of rows in the block on the diagonal (the last one in the column).

Returns
int Total number of rows in SparseBlockColumnMatrix
SparseBlockColumnMatrix & Isis::SparseBlockColumnMatrix::operator= ( const SparseBlockColumnMatrix src)

"Equals" operator.

Parameters
srcSparseBlockColumnMatrix to check against
void Isis::SparseBlockColumnMatrix::print ( std::ostream &  outstream)

Prints matrix blocks to std output stream out for debugging.

This version makes use of the Boost matrix library output of matrices as opposed to the printClean method below which explicitly prints the matrix elements for more control over the format.

Parameters
outstreamoutput stream

Referenced by Isis::SparseBlockMatrix::print().

void Isis::SparseBlockColumnMatrix::printClean ( std::ostream &  outstream)

Prints matrix blocks to std output stream out for debugging.

Explicitly prints the matrix elements for more control over the format as opposed to the print method above.

Parameters
outstreamoutput stream

Referenced by Isis::SparseBlockMatrix::printClean().

void Isis::SparseBlockColumnMatrix::wipe ( )

Deletes all pointer elements and removes them from the map.

Effectively, a destructor, and in fact, called by the ~SparseBlockColumnMatrix above.

void Isis::SparseBlockColumnMatrix::zeroBlocks ( )

Sets all elements of all matrix blocks to zero.


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

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:45:52