Isis 3 Programmer Reference
Isis::SparseBlockColumnMatrix Class Reference

SparseBlockColumnMatrix. More...

#include <SparseBlockMatrix.h>

Inheritance diagram for Isis::SparseBlockColumnMatrix:
Inheritance graph
Collaboration diagram for Isis::SparseBlockColumnMatrix:
Collaboration graph

Public Member Functions

 SparseBlockColumnMatrix ()
 Default constructor.
 
 ~SparseBlockColumnMatrix ()
 Destructor.
 
 SparseBlockColumnMatrix (const SparseBlockColumnMatrix &src)
 Copy constructor.
 
SparseBlockColumnMatrixoperator= (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.
 

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
History

2011-07-29 Ken Edmundson - Original Version

2014-02-25 Ken Edmundson - operators to read/write matrices to binary disk file and to write matrices to QDebug stream.

2014-07-23 Jeannie Backer - Modified QDataStream >> and << operators to use qint32, as recommended by Qt documentation.

2015-12-18 Ken Edmundson - 1) added more detailed documentation; 2) brought up to ISIS coding standards.

2016-08-10 Jeannie Backer - Replaced boost matrix with Isis::LinearAlgebra::Matrix. References #4163.

2017-05-09 Ken Edmundson - Added m_startColumn member and mutator/accessor methods to SparseBlockColumnMatrix. Done to eliminate lengthy computation of leading colums and rows. References #4664.

Definition at line 57 of file SparseBlockMatrix.h.

Constructor & Destructor Documentation

◆ SparseBlockColumnMatrix() [1/2]

Isis::SparseBlockColumnMatrix::SparseBlockColumnMatrix ( )

Default constructor.

Definition at line 35 of file SparseBlockMatrix.cpp.

References m_startColumn.

◆ ~SparseBlockColumnMatrix()

Isis::SparseBlockColumnMatrix::~SparseBlockColumnMatrix ( )

Destructor.

See description of wipe method below.

Definition at line 43 of file SparseBlockMatrix.cpp.

References wipe().

◆ SparseBlockColumnMatrix() [2/2]

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

Copy constructor.

Calls copy method immediately below.

Parameters
srcSparseBlockColumnMatrix to copy

Definition at line 63 of file SparseBlockMatrix.cpp.

References copy().

Member Function Documentation

◆ copy()

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

Copy method.

Parameters
srcSparseBlockColumnMatrix to copy

Definition at line 73 of file SparseBlockMatrix.cpp.

References m_startColumn, and wipe().

Referenced by operator=(), and SparseBlockColumnMatrix().

◆ insertMatrixBlock()

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

Definition at line 121 of file SparseBlockMatrix.cpp.

◆ numberOfColumns()

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

Definition at line 190 of file SparseBlockMatrix.cpp.

◆ numberOfElements()

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

Definition at line 168 of file SparseBlockMatrix.cpp.

◆ numberOfRows()

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

Definition at line 215 of file SparseBlockMatrix.cpp.

◆ operator=()

SparseBlockColumnMatrix & Isis::SparseBlockColumnMatrix::operator= ( const SparseBlockColumnMatrix & src)

"Equals" operator.

Parameters
srcSparseBlockColumnMatrix to check against

Definition at line 99 of file SparseBlockMatrix.cpp.

References copy().

◆ print()

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

Definition at line 239 of file SparseBlockMatrix.cpp.

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

◆ printClean()

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

Definition at line 266 of file SparseBlockMatrix.cpp.

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

◆ setStartColumn()

void Isis::SparseBlockColumnMatrix::setStartColumn ( int nStartColumn)

Sets starting column for block in full matrix.

Parameters
nStartColumnvalue for starting column in full matrix for this block columns

Definition at line 147 of file SparseBlockMatrix.cpp.

References m_startColumn.

◆ startColumn()

int Isis::SparseBlockColumnMatrix::startColumn ( ) const

Sets starting column for block in full matrix.

Returns
int returns the starting column in the full matrix

Definition at line 157 of file SparseBlockMatrix.cpp.

References m_startColumn.

◆ wipe()

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.

Definition at line 52 of file SparseBlockMatrix.cpp.

Referenced by copy(), and ~SparseBlockColumnMatrix().

◆ zeroBlocks()

void Isis::SparseBlockColumnMatrix::zeroBlocks ( )

Sets all elements of all matrix blocks to zero.

Definition at line 299 of file SparseBlockMatrix.cpp.

Member Data Documentation

◆ m_startColumn

int Isis::SparseBlockColumnMatrix::m_startColumn
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

Definition at line 84 of file SparseBlockMatrix.h.

Referenced by copy(), setStartColumn(), SparseBlockColumnMatrix(), and startColumn().


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