USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::SparseBlockMatrix Class Reference

SparseBlockMatrix. More...

#include <SparseBlockMatrix.h>

Inheritance diagram for Isis::SparseBlockMatrix:
Inheritance graph
Collaboration diagram for Isis::SparseBlockMatrix:
Collaboration graph

Public Member Functions

 ~SparseBlockMatrix ()
 Destructor.
 
 SparseBlockMatrix (const SparseBlockMatrix &src)
 Copy constructor.
 
SparseBlockMatrixoperator= (const SparseBlockMatrix &src)
 "Equals" operator.
 
void wipe ()
 Deletes all pointer elements and removes them from the list.
 
void copy (const SparseBlockMatrix &src)
 Copy method.
 
bool setNumberOfColumns (int n)
 Initializes number of columns (SparseBlockColumnMatrix).
 
void zeroBlocks ()
 Sets all elements of all matrix blocks to zero.
 
bool InsertMatrixBlock (int nColumnBlock, int nRowBlock, int nRows, int nCols)
 Inserts a "newed" boost matrix<double>* of size (nRows, nCols) into the matrix at nColumnBlock, nRowBlock.
 
boost::numeric::ublas::matrix
< double > * 
getBlock (int column, int row)
 Returns pointer to boost matrix at (column, row).
 
int numberOfBlocks ()
 Returns total number of blocks in matrix.
 
int numberOfDiagonalBlocks ()
 Returns number of diagonal matrix blocks (equivalent to size - there is one per column).
 
int numberOfOffDiagonalBlocks ()
 Returns number of off-diagonal matrix blocks.
 
int numberOfElements ()
 Returns number of matrix elements in matrix.
 
void print (std::ostream &outstream)
 Prints matrix blocks to std output stream out for debugging.
 
bool write (std::ofstream &fp_out, bool binary=true)
 

Detailed Description

SparseBlockMatrix.

This class is bla bla bla.

Author
2011-07-29 Ken Edmundson
History:

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.

Definition at line 137 of file SparseBlockMatrix.h.

Constructor & Destructor Documentation

Isis::SparseBlockMatrix::~SparseBlockMatrix ( )

Destructor.

Definition at line 608 of file SparseBlockMatrix.cpp.

Isis::SparseBlockMatrix::SparseBlockMatrix ( const SparseBlockMatrix src)

Copy constructor.

Calls copy method immediately below.

Definition at line 627 of file SparseBlockMatrix.cpp.

Member Function Documentation

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

Copy method.

Definition at line 634 of file SparseBlockMatrix.cpp.

matrix< double > * Isis::SparseBlockMatrix::getBlock ( int  column,
int  row 
)

Returns pointer to boost matrix at (column, row).

Parameters
columnblock column number
rowblock row number

Definition at line 765 of file SparseBlockMatrix.cpp.

bool Isis::SparseBlockMatrix::InsertMatrixBlock ( int  nColumnBlock,
int  nRowBlock,
int  nRows,
int  nCols 
)

Inserts a "newed" boost matrix<double>* of size (nRows, nCols) into the matrix at nColumnBlock, nRowBlock.

The inserted matrix elements are initialized to zero. If an entry exists at nColumnBlock, RowBlock, no insertion is made.

Parameters
nColumnBlockblock column number of inserted matrix (QList index)
nRowBlockblock row number of inserted matrix (key into map)
nRowsnumber of rows in matrix to be inserted
nColsnumber of columns in matrix to be inserted

Definition at line 683 of file SparseBlockMatrix.cpp.

int Isis::SparseBlockMatrix::numberOfBlocks ( )

Returns total number of blocks in matrix.

Definition at line 692 of file SparseBlockMatrix.cpp.

int Isis::SparseBlockMatrix::numberOfDiagonalBlocks ( )

Returns number of diagonal matrix blocks (equivalent to size - there is one per column).

Definition at line 710 of file SparseBlockMatrix.cpp.

int Isis::SparseBlockMatrix::numberOfElements ( )

Returns number of matrix elements in matrix.

Definition at line 745 of file SparseBlockMatrix.cpp.

int Isis::SparseBlockMatrix::numberOfOffDiagonalBlocks ( )

Returns number of off-diagonal matrix blocks.

Definition at line 737 of file SparseBlockMatrix.cpp.

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

"Equals" operator.

Definition at line 648 of file SparseBlockMatrix.cpp.

void Isis::SparseBlockMatrix::print ( std::ostream &  outstream)

Prints matrix blocks to std output stream out for debugging.

Definition at line 782 of file SparseBlockMatrix.cpp.

References Isis::SparseBlockColumnMatrix::print().

bool Isis::SparseBlockMatrix::setNumberOfColumns ( int  n)

Initializes number of columns (SparseBlockColumnMatrix).

Parameters
nnumber of columns to insert

Definition at line 663 of file SparseBlockMatrix.cpp.

Referenced by Isis::operator>>().

void Isis::SparseBlockMatrix::wipe ( )

Deletes all pointer elements and removes them from the list.

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

Definition at line 618 of file SparseBlockMatrix.cpp.

void Isis::SparseBlockMatrix::zeroBlocks ( )

Sets all elements of all matrix blocks to zero.

Definition at line 773 of file SparseBlockMatrix.cpp.


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