Commit 24bf75a0 authored by Ken Edmundson's avatar Ken Edmundson
Browse files

updated documentation in SparseBlockMatrix.cpp and h; brought up to ISIS...

updated documentation in SparseBlockMatrix.cpp and h; brought up to ISIS coding stds; update corresponding unitTest

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6485 41f8697f-d340-4b68-9986-7bafba869bb8
parent 946f8ed9
Loading
Loading
Loading
Loading
+143 −47
Original line number Diff line number Diff line
@@ -25,9 +25,8 @@ namespace Isis {


  /**
   * Deletes all pointer elements and removes them from the map.
   * Effectively, a destructor, and in fact, called by the
   * ~SparseBlockColumnMatrix above.
   * Deletes all pointer elements and removes them from the map. Effectively, a destructor, and in
   *  fact, called by the ~SparseBlockColumnMatrix above.
   */
  void SparseBlockColumnMatrix::wipe() {
    qDeleteAll(values());
@@ -37,6 +36,8 @@ namespace Isis {

  /**
   * Copy constructor. Calls copy method immediately below.
   *
   * @param src SparseBlockColumnMatrix to copy
   */
  SparseBlockColumnMatrix::SparseBlockColumnMatrix(const SparseBlockColumnMatrix& src) {
    copy(src);
@@ -45,6 +46,8 @@ namespace Isis {

  /**
   * Copy method.
   *
   * @param src SparseBlockColumnMatrix to copy
   */
  void SparseBlockColumnMatrix::copy(const SparseBlockColumnMatrix& src) {
    // handi-wipe
@@ -66,6 +69,8 @@ namespace Isis {

  /**
   * "Equals" operator.
   *
   * @param src SparseBlockColumnMatrix to check against
   */
  SparseBlockColumnMatrix&
      SparseBlockColumnMatrix::operator=(const SparseBlockColumnMatrix& src) {
@@ -79,18 +84,18 @@ namespace Isis {


  /**
   * Inserts a "newed" boost matrix<double>* of size (nRows, nCols) into the
   * map with the block column number as key. The matrix::clear call initializes
   * the matrix elements to zero.
   * If an entry exists at the key nColumnBlock, no insertion is made.
   * Inserts a "newed" boost matrix<double>* of size (nRows, nCols) into the map with the block
   *  column number as key. The matrix::clear call initializes the matrix elements to zero. If an
   *  entry exists at the key nColumnBlock, no insertion is made.
   *
   * @param nColumnBlock block column number of inserted matrix (key into map)
   * @param nRows number of rows in matrix to be inserted
   * @param nCols number of columns in matrix to be inserted
   *
   * @return bool Returns true if insertion is successful or if block already exists at nColumnBlock
   *              Returns false if attempt to allocate new block fails
   */
  bool SparseBlockColumnMatrix::InsertMatrixBlock(int nColumnBlock, int nRows,
                                                  int nCols) {

  bool SparseBlockColumnMatrix::insertMatrixBlock(int nColumnBlock, int nRows, int nCols) {
    // check if matrix already exists at the key "nColumnBlock"
    if ( this->contains(nColumnBlock) )
      return true;
@@ -112,8 +117,10 @@ namespace Isis {


  /**
   * 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.
   * 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.
   *
   * @return int Total number of matrix elements in SparseBlockColumnMatrix
   */
  int SparseBlockColumnMatrix::numberOfElements() {
    int nElements = 0;
@@ -133,8 +140,9 @@ namespace Isis {


  /**
   * Returns total number of columns in map (NOTE: NOT the number of
   * matrix blocks).
   * Returns total number of columns in map (NOTE: NOT the number of matrix blocks).
   *
   * @return int Total number of columns in SparseBlockColumnMatrix
   */
  int SparseBlockColumnMatrix::numberOfColumns() {

@@ -156,8 +164,10 @@ namespace Isis {


  /**
   * Returns total number of rows in map (this needs to be clarified and maybe rewritten)
   * its the number of rows in the block on the diagonal (the last one in the column).
   * 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).
   *
   * @return int Total number of rows in SparseBlockColumnMatrix
   */
  int SparseBlockColumnMatrix::numberOfRows() {

@@ -177,7 +187,11 @@ namespace Isis {


  /**
   * Prints matrix blocks to std output stream out for debugging.
   * 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.
   *
   * @param outstream output stream
   */
  void SparseBlockColumnMatrix::print(std::ostream& outstream) {
    if ( size() == 0 ) {
@@ -201,7 +215,10 @@ namespace Isis {


  /**
   * Prints matrix blocks to std output stream out for debugging.
   * 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.
   *
   * @param outstream output stream
   */
  void SparseBlockColumnMatrix::printClean(std::ostream& outstream) {
    if ( size() == 0 ) {
@@ -247,6 +264,9 @@ namespace Isis {

  /**
   * Writes matrix to binary disk file pointed to by QDataStream stream
   *
   * @param stream stream pointing to binary disk file
   * @param sbcm SparseBlockColumnMatrix to write
   */
  QDataStream &operator<<(QDataStream &stream, const SparseBlockColumnMatrix &sbcm) {
    // write number of blocks in this column
@@ -278,6 +298,9 @@ namespace Isis {

  /**
   * Reads matrix from binary disk file pointed to by QDataStream stream
   *
   * @param stream stream pointing to binary disk file
   * @param sbcm SparseBlockColumnMatrix to read
   */
  QDataStream &operator>>(QDataStream &stream, SparseBlockColumnMatrix &sbcm) {
    qint32 nBlocks, nBlockNumber, nRows, nCols;
@@ -295,7 +318,7 @@ namespace Isis {
      stream.readRawData((char*)data, nRows*nCols*sizeof(double));

      // insert matrix at correct key
      sbcm.InsertMatrixBlock(nBlockNumber, nRows, nCols);
      sbcm.insertMatrixBlock(nBlockNumber, nRows, nCols);

      // get matrix
      matrix<double>* matrix = sbcm[nBlockNumber];
@@ -314,7 +337,10 @@ namespace Isis {


  /**
   * Writes matrix to QDebug stream (dbg)
   * Writes matrix to QDebug stream
   *
   * @param dbg debug stream
   * @param sbcm SparseBlockColumnMatrix to write to debug stream
   */
  QDebug operator<<(QDebug dbg, const SparseBlockColumnMatrix &sbcm) {
    dbg.space() << "New Block" << endl;
@@ -342,6 +368,7 @@ namespace Isis {
        }
        dbg.space() << endl;
      }

      dbg.space() << endl;
    }

@@ -361,9 +388,8 @@ namespace Isis {


  /**
   * Deletes all pointer elements and removes them from the map.
   * Effectively, a destructor, and in fact, called by the
   * ~SparseBlockColumnMatrix above.
   * Deletes all pointer elements and removes them from the map. Effectively, a destructor, and in
   * fact, called by the ~SparseBlockColumnMatrix above.
   */
  void SparseBlockRowMatrix::wipe() {
    qDeleteAll(values());
@@ -372,7 +398,9 @@ namespace Isis {


  /**
   * Copy constructor. Calls method immediately below.
   * Copy constructor. Calls copy method immediately below.
   *
   * @param src SparseBlockRowMatrix to copy
   */
  SparseBlockRowMatrix::SparseBlockRowMatrix(const SparseBlockRowMatrix& src) {
    copy(src);
@@ -381,6 +409,8 @@ namespace Isis {

  /**
   * Copy method.
   *
   * @param src SparseBlockRowMatrix to copy
   */
  void SparseBlockRowMatrix::copy(const SparseBlockRowMatrix& src) {
    // handi-wipe
@@ -402,6 +432,8 @@ namespace Isis {

  /**
   * "Equals" operator.
   *
   * @param src SparseBlockRowMatrix to check against
   */
  SparseBlockRowMatrix&
      SparseBlockRowMatrix::operator=(const SparseBlockRowMatrix& src) {
@@ -415,17 +447,21 @@ namespace Isis {


  /**
   * Inserts a "newed" boost matrix<double>* 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.
   * Inserts a "newed" boost matrix<double>* 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.
   *
   * @param nRowBlock block row number of inserted matrix (key into map)
   * @param nRows number of rows in matrix to be inserted
   * @param nCols number of columns in matrix to be inserted
   *
   * @return bool Returns true if insertion successful
   *              Returns false if block already exists at nRowBlock or if allocation of new block
   *              fails
   *              TODO: we return true in the SparseBlockColumnMatrix if the block already exists,
   *                    why is it different here?
   */
  bool SparseBlockRowMatrix::InsertMatrixBlock(int nRowBlock, int nRows,
                                                  int nCols) {
  bool SparseBlockRowMatrix::insertMatrixBlock(int nRowBlock, int nRows, int nCols) {
    if ( this->contains(nRowBlock) )
      return false;

@@ -445,6 +481,8 @@ namespace Isis {
  /**
   * 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.
   *
   * @return int Total number of matrix elements in SparseBlockRowMatrix
   */
  int SparseBlockRowMatrix::numberOfElements() {
    int nElements = 0;
@@ -465,6 +503,8 @@ namespace Isis {

  /**
   * Prints matrix blocks to std output stream out for debugging.
   *
   * @param outstream output stream
   */
  void SparseBlockRowMatrix::print(std::ostream& outstream) {
    if ( size() == 0 ) {
@@ -489,6 +529,8 @@ namespace Isis {

  /**
   * Prints matrix blocks to std output stream out for debugging.
   *
   * @param outstream output stream
   */
  void SparseBlockRowMatrix::printClean(std::ostream& outstream) {
    if ( size() == 0 ) {
@@ -533,8 +575,10 @@ namespace Isis {


  /**
   * Copies a SparseBlockRowMatrix to a Boost compressed_matrix
   * This may be a temporary implementation
   * Copies a SparseBlockRowMatrix to a Boost compressed_matrix. This may be a temporary
   *  implementation
   *
   * @param B Boost matrix to copy this SparseBlockRowMatrix to
   */
  void SparseBlockRowMatrix::copyToBoost(compressed_matrix<double>& B) {
    B.clear();
@@ -565,7 +609,11 @@ namespace Isis {


  /**
     * TODO
   * Sums and returns the number of columns in each matrix block prior to nblockColumn
   *
   * @param nblockColumn
   *
   * @return int Number of leading columns for block at nblockColumn
   */
    int SparseBlockRowMatrix::getLeadingColumnsForBlock(int nblockColumn) {

@@ -598,6 +646,9 @@ namespace Isis {

  /**
   * Writes matrix to binary disk file pointed to by QDataStream stream
   *
   * @param stream stream pointing to binary disk file
   * @param sbrm SparseBlockRowMatrix to write
   */
  QDataStream &operator<<(QDataStream &stream, const SparseBlockRowMatrix &sbrm) {
    // write number of blocks in this column
@@ -629,6 +680,9 @@ namespace Isis {

  /**
   * Reads matrix from binary disk file pointed to by QDataStream stream
   *
   * @param stream stream pointing to binary disk file
   * @param sbcm SparseBlockColumnMatrix to read
   */
  QDataStream &operator>>(QDataStream &stream, SparseBlockRowMatrix &sbrm) {
    qint32 nBlocks, nBlockNumber, nRows, nCols;
@@ -646,7 +700,7 @@ namespace Isis {
      stream.readRawData((char*)data, nRows*nCols*sizeof(double));

      // insert matrix at correct key
      sbrm.InsertMatrixBlock(nBlockNumber, nRows, nCols);
      sbrm.insertMatrixBlock(nBlockNumber, nRows, nCols);

      // get matrix
      matrix<double>* matrix = sbrm[nBlockNumber];
@@ -665,7 +719,10 @@ namespace Isis {


  /**
   * Writes matrix to QDebug stream (dbg)
   * Writes matrix to QDebug stream
   *
   * @param dbt debug stream
   * @param sbcm SparseBlockRowMatrix to write to debug stream
   */
  QDebug operator<<(QDebug dbg, const SparseBlockRowMatrix &sbrm) {
    dbg.space() << "New Block" << endl;
@@ -712,9 +769,8 @@ namespace Isis {


  /**
   * Deletes all pointer elements and removes them from the list.
   * Effectively, a destructor, and in fact, called by the
   * ~SparseBlockMatrix above.
   * Deletes all pointer elements and removes them from the list. Effectively, a destructor, and in
   *  fact, called by the ~SparseBlockMatrix above.
   */
  void SparseBlockMatrix::wipe() {
    qDeleteAll(*this);
@@ -724,6 +780,8 @@ namespace Isis {

  /**
   * Copy constructor. Calls copy method immediately below.
   *
   * @param src SparseBlockMatrix to copy
   */
  SparseBlockMatrix::SparseBlockMatrix(const SparseBlockMatrix& src) {
    copy(src);
@@ -732,6 +790,8 @@ namespace Isis {

  /**
   * Copy method.
   *
   * @param src SparseBlockMatrix to copy
   */
  void SparseBlockMatrix::copy(const SparseBlockMatrix& src) {
    // handi-wipe
@@ -746,6 +806,8 @@ namespace Isis {

  /**
   * "Equals" operator.
   *
   * @param src SparseBlockMatrix to check against
   */
  SparseBlockMatrix& SparseBlockMatrix::operator=(const SparseBlockMatrix& src) {
    if ( this == &src )
@@ -761,6 +823,9 @@ namespace Isis {
   * Initializes number of columns (SparseBlockColumnMatrix).
   *
   * @param n number of columns to insert
   *
   * @return bool Always returns true
   *              TODO: why bother returning bool? should there be a false condition?
   */
  bool SparseBlockMatrix::setNumberOfColumns( int n ) {

@@ -781,15 +846,18 @@ namespace Isis {
   * @param nRowBlock block row number of inserted matrix (key into map)
   * @param nRows number of rows in matrix to be inserted
   * @param nCols number of columns in matrix to be inserted
   *
   * @return bool Returns result of SparseBlockColumnMatrix::insertMatrixBlock()
   */
  bool SparseBlockMatrix::InsertMatrixBlock(int nColumnBlock, int nRowBlock,
                                            int nRows, int nCols) {
    return (*this)[nColumnBlock]->InsertMatrixBlock(nRowBlock, nRows, nCols);
  bool SparseBlockMatrix::insertMatrixBlock(int nColumnBlock, int nRowBlock, int nRows, int nCols) {
    return (*this)[nColumnBlock]->insertMatrixBlock(nRowBlock, nRows, nCols);
  }


  /**
   * Returns total number of blocks in matrix.
   *
   * @return int Total number of blocks in matrix
   */
  int SparseBlockMatrix::numberOfBlocks() {
    int nBlocks = 0;
@@ -806,8 +874,9 @@ namespace Isis {


  /**
   * Returns number of diagonal matrix blocks (equivalent to size - there is one
   * per column).
   * Returns number of diagonal matrix blocks (equivalent to size - there is one per column).
   *
   * @return int Number of diagnonal blocks in matrix
   */
  int SparseBlockMatrix::numberOfDiagonalBlocks() {
    int ndiagBlocks = 0;
@@ -835,6 +904,8 @@ namespace Isis {

  /**
   * Returns number of off-diagonal matrix blocks.
   *
   * @return int Number of off-diagonal blocks in matrix
   */
  int SparseBlockMatrix::numberOfOffDiagonalBlocks() {
    return (numberOfBlocks() - numberOfDiagonalBlocks());
@@ -843,6 +914,8 @@ namespace Isis {

  /**
   * Returns number of matrix elements in matrix.
   *
   * @return int Total number of matrix elements
   */
  int SparseBlockMatrix::numberOfElements() {
    int nElements = 0;
@@ -859,10 +932,12 @@ namespace Isis {


  /**
   * Returns pointer to boost matrix at (column, row).
   * Returns pointer to boost matrix at position (column, row).
   *
   * @param column block column number
   * @param row block row number
   *
   * @return matrix<double>* Pointer to Boost matrix at position (column, row)
   */
  matrix<double>* SparseBlockMatrix::getBlock(int column, int row) {
    return (*(*this)[column])[row];
@@ -880,6 +955,8 @@ namespace Isis {

  /**
   * Prints matrix blocks to std output stream out for debugging.
   *
   * @param outstream output stream
   */
  void SparseBlockMatrix::print(std::ostream& outstream) {
    if ( size() == 0 ) {
@@ -902,6 +979,8 @@ namespace Isis {

  /**
   * Prints matrix blocks to std output stream out for debugging.
   *
   * @param outstream output stream
   */
  void SparseBlockMatrix::printClean(std::ostream& outstream) {
    if ( size() == 0 ) {
@@ -922,7 +1001,11 @@ namespace Isis {


  /**
   * TODO
   * Sums and returns the number of columns in each matrix block prior to nblockColumn
   *
   * @param nblockColumn
   *
   * @return int Number of leading column elements for block at nblockColumn
   */
  int SparseBlockMatrix::getLeadingColumnsForBlock(int nblockColumn) {

@@ -952,7 +1035,11 @@ namespace Isis {


  /**
   * TODO
   * Sums and returns the number of rows in each matrix block prior to nblockRow
   *
   * @param nblockRow
   *
   * @return int Number of leading row elements for block at nblockRow
   */
  int SparseBlockMatrix::getLeadingRowsForBlock(int nblockRow) {

@@ -985,6 +1072,9 @@ namespace Isis {

  /**
   * Writes matrix to binary disk file pointed to by QDataStream stream
   *
   * @param stream stream pointing to binary disk file
   * @param sparseBlockMatrix SparseBlockMatrix to write
   */
  QDataStream &operator<<(QDataStream &stream, const SparseBlockMatrix &sparseBlockMatrix) {
    int nBlockColumns = sparseBlockMatrix.size();
@@ -1000,6 +1090,9 @@ namespace Isis {

  /**
   * Reads matrix from binary disk file pointed to by QDataStream stream
   *
   * @param stream stream pointing to binary disk file
   * @param sparseBlockMatrix SparseBlockMatrix to read
   */
  QDataStream &operator>>(QDataStream &stream, SparseBlockMatrix &sparseBlockMatrix) {
    qint32 nBlockColumns;
@@ -1015,7 +1108,10 @@ namespace Isis {
  }

  /**
   * Writes matrix to QDebug stream (dbg)
   * Writes matrix to QDebug stream
   *
   * @param dbg debug stream
   * @param m SparseBlockMatrix to write to debug stream
   */
  QDebug operator<<(QDebug dbg, const SparseBlockMatrix &m) {
    int nBlockColumns = m.size();
+42 −6
Original line number Diff line number Diff line
@@ -35,7 +35,12 @@ namespace Isis {
  /**
   * @brief SparseBlockColumnMatrix
   *
   * This class is bla bla bla.
   * 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.
   *
   * @ingroup Utility
   *
@@ -47,6 +52,8 @@ namespace Isis {
   *                           to write matrices to QDebug stream.
   *   @history 2014-07-23 Jeannie Backer - Modified QDataStream >> and << operators to use qint32,
   *                           as recommended by Qt documentation.
   *   @history 2015-12-18 Ken Edmundson - 1) added more detailed documentation; 2) brought up to
   *                           ISIS coding standards.
   */
  class SparseBlockColumnMatrix :
      public QMap< int, boost::numeric::ublas::matrix<double>* > {
@@ -64,7 +71,7 @@ namespace Isis {
    void copy(const SparseBlockColumnMatrix& src);

    void zeroBlocks();
    bool InsertMatrixBlock(int nColumnBlock, int nRows, int nCols);
    bool insertMatrixBlock(int nColumnBlock, int nRows, int nCols);
    int numberOfElements();
    int numberOfRows();
    int numberOfColumns();
@@ -83,7 +90,18 @@ namespace Isis {
  /**
   * @brief SparseBlockRowMatrix
   *
   * This class is bla bla bla.
   * 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?
   *
   * @ingroup Utility
   *
@@ -93,6 +111,8 @@ namespace Isis {
   *   @history 2011-07-29 Ken Edmundson Created
   *   @history 2014-02-25 Ken Edmundson - operators to read/write matrices to binary disk file and
   *                           to write matrices to QDebug stream.
   *   @history 2015-12-18 Ken Edmundson - 1) added more detailed documentation; 2) brought closer
   *                           to ISIS coding standards.
   */
  class SparseBlockRowMatrix :
      public QMap< int, boost::numeric::ublas::matrix<double>* > {
@@ -111,7 +131,7 @@ namespace Isis {
    void copy(const SparseBlockRowMatrix& src);

    void zeroBlocks();
    bool InsertMatrixBlock(int nRowBlock, int nRows, int nCols);
    bool insertMatrixBlock(int nRowBlock, int nRows, int nCols);
    void copyToBoost(boost::numeric::ublas::compressed_matrix<double>& B);
    int getLeadingColumnsForBlock(int nblockColumn);
    int numberOfElements();
@@ -129,7 +149,21 @@ namespace Isis {
  /**
   * @brief SparseBlockMatrix
   *
   * This class is bla bla bla.
   * The CHOLMOD (Cholesky decomposition) package uses the compressed column storage (CCS) matrix
   *  format which is efficient in memory storage but inefficient to fill in an arbitrary manner
   *  because the insertion of every non-zero entry requires that all succeeding entries be shifted.
   *
   *  To build the reduced normal equations matrix, an interim sparse matrix structure is required
   *  that can be efficiently populated in a random fashion and can be traversed by column in row
   *  order to subsequently construct the CCS matrix required by CHOLMOD. We use a type of Block
   *  Compressed Column Storage (BCCS) which consists of an array of map containers (QList of
   *  SparseBlockColumnMatrices), each representing a column of square matrix blocks in the reduced
   *  normal equations. 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. The BCCS matrix is
   *  created only in the first iteration of the bundle adjustment; in subsequent iterations it need
   *  only be repopulated. As the normal equations matrix is symmetric, only the upper triangular
   *  portion is stored in memory.
   *
   * @ingroup Utility
   *
@@ -139,6 +173,8 @@ namespace Isis {
   *   @history 2011-07-29 Ken Edmundson Created
   *   @history 2014-02-25 Ken Edmundson - operators to read/write matrices to binary disk file and
   *                           to write matrices to QDebug stream.
   *   @history 2015-12-18 Ken Edmundson - 1) added more detailed documentation; 2) brought closer
   *                           to ISIS coding standards.
   */
  class SparseBlockMatrix : public QList< SparseBlockColumnMatrix* > {

@@ -156,7 +192,7 @@ namespace Isis {

    bool setNumberOfColumns( int n );
    void zeroBlocks();
    bool InsertMatrixBlock(int nColumnBlock, int nRowBlock, int nRows, int nCols);
    bool insertMatrixBlock(int nColumnBlock, int nRowBlock, int nRows, int nCols);
    boost::numeric::ublas::matrix<double>* getBlock(int column, int row);
    int numberOfBlocks();
    int numberOfDiagonalBlocks();
+2 −0
Original line number Diff line number Diff line
@@ -213,6 +213,8 @@ Empty SparseBlockMatrix...
    # diagonal matrix blocks: 1
# off-diagonal matrix blocks: 1
           # matrix elements: 18
# leading columns for block2: 3
   # leading rows for block1: 0
Printing SparseBlockMatrix...
Empty SparseBlockColumnMatrix...
Printing SparseBlockColumnMatrix...
+25 −23

File changed.

Preview size limit exceeded, changes collapsed.