Isis Developer Reference
|
SparseBlockColumnMatrix. More...
#include <SparseBlockMatrix.h>
Public Member Functions | |
SparseBlockColumnMatrix () | |
Default constructor. | |
~SparseBlockColumnMatrix () | |
Destructor. | |
SparseBlockColumnMatrix (const SparseBlockColumnMatrix &src) | |
Copy constructor. | |
SparseBlockColumnMatrix & | operator= (const SparseBlockColumnMatrix &src) |
"Equals" operator. | |
void | wipe () |
Deletes all pointer elements and removes them from the map. | |
void | copy (const SparseBlockColumnMatrix &src) |
Copy method. | |
void | zeroBlocks () |
Sets all elements of all matrix blocks to zero. | |
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. | |
void | setStartColumn (int nStartColumn) |
Sets starting column for block in full matrix. | |
int | startColumn () const |
Sets starting column for block in full matrix. | |
int | numberOfElements () |
Returns total number of matrix elements in map (NOTE: NOT the number of matrix blocks). | |
int | numberOfRows () |
Returns total number of rows in map (this needs to be clarified and maybe rewritten). | |
int | numberOfColumns () |
Returns total number of columns in map (NOTE: NOT the number of matrix blocks). | |
void | print (std::ostream &outstream) |
Prints matrix blocks to std output stream out for debugging. | |
void | printClean (std::ostream &outstream) |
Prints matrix blocks to std output stream out for debugging. | |
Protected Attributes | |
int | m_startColumn |
starting column for this Block Column in full matrix e.g. | |
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.
Isis::SparseBlockColumnMatrix::SparseBlockColumnMatrix | ( | ) |
Default constructor.
References m_startColumn.
Isis::SparseBlockColumnMatrix::~SparseBlockColumnMatrix | ( | ) |
Isis::SparseBlockColumnMatrix::SparseBlockColumnMatrix | ( | const SparseBlockColumnMatrix & | src | ) |
Copy constructor.
Calls copy method immediately below.
src | SparseBlockColumnMatrix to copy |
References copy().
void Isis::SparseBlockColumnMatrix::copy | ( | const SparseBlockColumnMatrix & | src | ) |
Copy method.
src | SparseBlockColumnMatrix to copy |
References m_startColumn, and wipe().
Referenced by operator=(), and SparseBlockColumnMatrix().
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.
nColumnBlock | block column number of inserted matrix (key into map) |
nRows | number of rows in matrix to be inserted |
nCols | number of columns in matrix to be inserted |
int Isis::SparseBlockColumnMatrix::numberOfColumns | ( | ) |
Returns total number of columns in map (NOTE: NOT the number of matrix blocks).
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.
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).
SparseBlockColumnMatrix & Isis::SparseBlockColumnMatrix::operator= | ( | const SparseBlockColumnMatrix & | src | ) |
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.
outstream | output 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.
outstream | output stream |
Referenced by Isis::SparseBlockMatrix::printClean().
void Isis::SparseBlockColumnMatrix::setStartColumn | ( | int | nStartColumn | ) |
Sets starting column for block in full matrix.
nStartColumn | value for starting column in full matrix for this block columns |
References m_startColumn.
int Isis::SparseBlockColumnMatrix::startColumn | ( | ) | const |
Sets starting column for block in full matrix.
References m_startColumn.
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.
Referenced by copy(), and ~SparseBlockColumnMatrix().
void Isis::SparseBlockColumnMatrix::zeroBlocks | ( | ) |
Sets all elements of all matrix blocks to zero.
|
protected |
starting column for this Block Column in full matrix e.g.
for Block Column 4, if the preceding Block Columns each have 6 columns, then the starting column for Block Column 4 is 24
Referenced by copy(), setStartColumn(), SparseBlockColumnMatrix(), and startColumn().