#include <SparseBlockMatrix.h>
Public Member Functions | |
~SparseBlockRowMatrix () | |
Destructor. More... | |
SparseBlockRowMatrix (const SparseBlockRowMatrix &src) | |
Copy constructor. More... | |
SparseBlockRowMatrix & | operator= (const SparseBlockRowMatrix &src) |
"Equals" operator. More... | |
void | wipe () |
Deletes all pointer elements and removes them from the map. More... | |
void | copy (const SparseBlockRowMatrix &src) |
Copy method. More... | |
void | zeroBlocks () |
Sets all elements of all matrix blocks to zero. More... | |
bool | insertMatrixBlock (int nRowBlock, int nRows, int nCols) |
Inserts a "newed" LinearAlgebra::Matrix pointer of size (nRows, nCols) into the map with the block row number as key. More... | |
void | copyToBoost (boost::numeric::ublas::compressed_matrix< double > &B) |
Copies a SparseBlockRowMatrix to a Boost compressed_matrix. More... | |
int | getLeadingColumnsForBlock (int nblockColumn) |
Sums and returns the number of columns in each matrix block prior to nblockColumn. More... | |
int | numberOfElements () |
Returns total number of matrix elements 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... | |
A SparseBlockRowMatrix is a QMap of square matrix blocks and represents a row of square matrix blocks in the reduced normal equations matrix. The key into each row map is the block’s column 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.
Note that this class is not apparently different than the SparseBlockColumnMatrix. It was implemented for convenience in the BundleAdjustment class for those times when we need to access rows of matrix blocks as opposed to columns of matrix blocks.
TO BE RESOLVED: Do we really need this as a separate class? Can we do everything we need with the SparseBlockColumnMatrix?
2011-07-29 Ken Edmundson Created
2014-02-25 Ken Edmundson - operators to read/write matrices to binary disk file and to write matrices to QDebug stream.
2015-12-18 Ken Edmundson - 1) added more detailed documentation; 2) brought closer to ISIS coding standards.
Definition at line 125 of file SparseBlockMatrix.h.
Isis::SparseBlockRowMatrix::~SparseBlockRowMatrix | ( | ) |
Destructor.
See description of wipe method below.
Definition at line 392 of file SparseBlockMatrix.cpp.
Isis::SparseBlockRowMatrix::SparseBlockRowMatrix | ( | const SparseBlockRowMatrix & | src | ) |
Copy constructor.
Calls copy method immediately below.
src | SparseBlockRowMatrix to copy |
Definition at line 412 of file SparseBlockMatrix.cpp.
void Isis::SparseBlockRowMatrix::copy | ( | const SparseBlockRowMatrix & | src | ) |
Copy method.
src | SparseBlockRowMatrix to copy |
Definition at line 422 of file SparseBlockMatrix.cpp.
void Isis::SparseBlockRowMatrix::copyToBoost | ( | boost::numeric::ublas::compressed_matrix< double > & | B | ) |
Copies a SparseBlockRowMatrix to a Boost compressed_matrix.
This may be a temporary implementation
B | Boost matrix to copy this SparseBlockRowMatrix to |
Definition at line 590 of file SparseBlockMatrix.cpp.
int Isis::SparseBlockRowMatrix::getLeadingColumnsForBlock | ( | int | nblockColumn | ) |
Sums and returns the number of columns in each matrix block prior to nblockColumn.
nblockColumn |
Definition at line 625 of file SparseBlockMatrix.cpp.
bool Isis::SparseBlockRowMatrix::insertMatrixBlock | ( | int | nRowBlock, |
int | nRows, | ||
int | nCols | ||
) |
Inserts a "newed" LinearAlgebra::Matrix pointer of size (nRows, nCols) into the map with the block row number as key.
The matrix::clear call initializes the matrix elements to zero. If an entry exists at the key nRowBlock, no insertion is made.
nRowBlock | block row 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 |
Definition at line 471 of file SparseBlockMatrix.cpp.
Referenced by Isis::operator>>(), and Isis::BundleAdjust::productATransB().
int Isis::SparseBlockRowMatrix::numberOfElements | ( | ) |
Returns total number of matrix elements in map (NOTE: NOT the number of matrix blocks).
The sum of all the elements of all the matrix blocks.
Definition at line 494 of file SparseBlockMatrix.cpp.
SparseBlockRowMatrix & Isis::SparseBlockRowMatrix::operator= | ( | const SparseBlockRowMatrix & | src | ) |
"Equals" operator.
src | SparseBlockRowMatrix to check against |
Definition at line 446 of file SparseBlockMatrix.cpp.
void Isis::SparseBlockRowMatrix::print | ( | std::ostream & | outstream | ) |
Prints matrix blocks to std output stream out for debugging.
outstream | output stream |
Definition at line 516 of file SparseBlockMatrix.cpp.
void Isis::SparseBlockRowMatrix::printClean | ( | std::ostream & | outstream | ) |
Prints matrix blocks to std output stream out for debugging.
outstream | output stream |
Definition at line 542 of file SparseBlockMatrix.cpp.
void Isis::SparseBlockRowMatrix::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 401 of file SparseBlockMatrix.cpp.
void Isis::SparseBlockRowMatrix::zeroBlocks | ( | ) |
Sets all elements of all matrix blocks to zero.
Definition at line 575 of file SparseBlockMatrix.cpp.
Referenced by Isis::BundleAdjust::formPointNormals().
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/13/2023 00:18:04 |