1 #ifndef SparseBlockMatrix_h 2 #define SparseBlockMatrix_h 31 #include <boost/numeric/ublas/fwd.hpp> 70 public QMap< int, LinearAlgebra::Matrix * > {
92 void print(std::ostream& outstream);
137 public QMap< int, LinearAlgebra::Matrix * > {
154 void copyToBoost(boost::numeric::ublas::compressed_matrix<double>& B);
157 void print(std::ostream& outstream);
220 void print(std::ostream& outstream);
222 bool write(std::ofstream &fp_out,
bool binary=
true);
bool insertMatrixBlock(int nColumnBlock, int nRowBlock, int nRows, int nCols)
Inserts a "newed" boost LinearAlgebra::Matrix pointer of size (nRows, nCols) into the matrix at nColu...
void copy(const SparseBlockRowMatrix &src)
Copy method.
void setStartColumn(int nStartColumn)
Sets starting column for block in full matrix.
void wipe()
Deletes all pointer elements and removes them from the map.
SparseBlockRowMatrix & operator=(const SparseBlockRowMatrix &src)
"Equals" operator.
void zeroBlocks()
Sets all elements of all matrix blocks to zero.
int numberOfElements()
Returns total number of matrix elements in map (NOTE: NOT the number of matrix blocks).
~SparseBlockColumnMatrix()
Destructor.
int numberOfElements()
Returns total number of matrix elements in map (NOTE: NOT the number of matrix blocks).
SparseBlockColumnMatrix & operator=(const SparseBlockColumnMatrix &src)
"Equals" operator.
boost::numeric::ublas::matrix< double > Matrix
Definition for an Isis::LinearAlgebra::Matrix of doubles.
void zeroBlocks()
Sets all elements of all matrix blocks to zero.
void printClean(std::ostream &outstream)
Prints matrix blocks to std output stream out for debugging.
int getLeadingColumnsForBlock(int nblockColumn)
Sums and returns the number of columns in each matrix block prior to nblockColumn.
int m_startColumn
starting column for this Block Column in full matrix e.g.
int getLeadingRowsForBlock(int nblockRow)
Sums and returns the number of rows in each matrix block prior to nblockRow.
void wipe()
Deletes all pointer elements and removes them from the map.
int numberOfElements()
Returns number of matrix elements in matrix.
int numberOfRows()
Returns total number of rows in map (this needs to be clarified and maybe rewritten).
~SparseBlockMatrix()
Destructor.
bool insertMatrixBlock(int nRowBlock, int nRows, int nCols)
Inserts a "newed" LinearAlgebra::Matrix pointer of size (nRows, nCols) into the map with the block ro...
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
void wipe()
Deletes all pointer elements and removes them from the list.
void printClean(std::ostream &outstream)
Prints matrix blocks to std output stream out for debugging.
~SparseBlockRowMatrix()
Destructor.
void print(std::ostream &outstream)
Prints matrix blocks to std output stream out for debugging.
void print(std::ostream &outstream)
Prints matrix blocks to std output stream out for debugging.
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.
int numberOfColumns()
Returns total number of columns in map (NOTE: NOT the number of matrix blocks).
int numberOfOffDiagonalBlocks()
Returns number of off-diagonal matrix blocks.
LinearAlgebra::Matrix * getBlock(int column, int row)
Returns pointer to boost matrix at position (column, row).
void copyToBoost(boost::numeric::ublas::compressed_matrix< double > &B)
Copies a SparseBlockRowMatrix to a Boost compressed_matrix.
int numberOfDiagonalBlocks()
Returns number of diagonal matrix blocks (equivalent to size - there is one per column).
void zeroBlocks()
Sets all elements of all matrix blocks to zero.
Namespace for ISIS/Bullet specific routines.
SparseBlockColumnMatrix()
Default constructor.
bool insertMatrixBlock(int nColumnBlock, int nRows, int nCols)
Inserts a "newed" LinearAlgebra::Matrix pointer of size (nRows, nCols) into the map with the block co...
void copy(const SparseBlockColumnMatrix &src)
Copy method.
bool setNumberOfColumns(int n)
Initializes number of columns (SparseBlockColumnMatrix).
int numberOfBlocks()
Returns total number of blocks in matrix.
int startColumn() const
Sets starting column for block in full matrix.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
SparseBlockMatrix & operator=(const SparseBlockMatrix &src)
"Equals" operator.
void copy(const SparseBlockMatrix &src)
Copy method.
int getLeadingColumnsForBlock(int nblockColumn)
Sums and returns the number of columns in each matrix block prior to nblockColumn.