SRBA: Sparser Relative Bundle Adjustment
|
A wrapper of mrpt::math::MatrixBlockSparseCols<> with extended functionality. Refer to the docs of the base class. A templated column-indexed efficient storage of block-sparse Jacobian or Hessian matrices, together with other arbitrary information. Columns are stored in a non-associative container, but the contents of each column are kept within an std::map<> indexed by row. All submatrix blocks have the same size, which allows dense storage of them in fixed-size matrices, avoiding costly memory allocations.
Definition at line 319 of file srba_types.h.
#include <srba_types.h>
Public Types | |
typedef mrpt::math::MatrixBlockSparseCols < Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL > | base_t |
typedef Eigen::Matrix< Scalar, NROWS, NCOLS > | matrix_t |
typedef INFO | symbolic_t |
typedef mrpt::aligned_containers < size_t, TEntry >::map_t | col_t |
Public Member Functions | |
size_t | findRowSpan (size_t *row_min_idx=NULL, size_t *row_max_idx=NULL) const |
void | getSparsityStats (size_t &nMaxBlocks, size_t &nNonZeroBlocks) const |
col_t & | getCol (const size_t idx) |
const col_t & | getCol (const size_t idx) const |
const mrpt::utils::map_as_vector < size_t, size_t > & | getColInverseRemappedIndices () const |
const std::vector< size_t > & | getColRemappedIndices () const |
col_t & | appendCol (const size_t remapIndex) |
void | setColCount (const size_t nCols) |
size_t | getColCount () const |
void | clearColEntries () |
void | clearAll () |
void | saveToTextFileAsDense (const std::string &filename, const bool force_symmetry=false, const bool is_col_compressed=true) const |
void | getAsDense (mrpt::math::CMatrixDouble &D, const bool force_symmetry=false, const bool is_col_compressed=true) const |
size_t | findCurrentNumberOfRows () const |
void | getBinaryBlocksRepresentation (MATRIX &out) const |
void | copyNumericalValuesFrom (const MatrixBlockSparseCols< Scalar, NROWS, NCOLS, INFO, HAS_REMAP > &o) |
Static Public Member Functions | |
static size_t | findRowSpan (const std::vector< typename base_t::col_t * > &lstColumns, size_t *row_min_idx=NULL, size_t *row_max_idx=NULL) |
static void | getSparsityStats (const std::vector< typename base_t::col_t * > &lstColumns, size_t &nMaxBlocks, size_t &nNonZeroBlocks) |
size_t srba::SparseBlockMatrix< Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL >::findRowSpan | ( | size_t * | row_min_idx = NULL , |
size_t * | row_max_idx = NULL |
||
) | const [inline] |
Goes over all the columns and keep the largest span MAX_ROW_INDEX - MIN_ROW_INDEX, the column length
Definition at line 324 of file srba_types.h.
static size_t srba::SparseBlockMatrix< Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL >::findRowSpan | ( | const std::vector< typename base_t::col_t * > & | lstColumns, |
size_t * | row_min_idx = NULL , |
||
size_t * | row_max_idx = NULL |
||
) | [inline, static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 342 of file srba_types.h.
void srba::SparseBlockMatrix< Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL >::getSparsityStats | ( | size_t & | nMaxBlocks, |
size_t & | nNonZeroBlocks | ||
) | const [inline] |
Returns the number of (symbolically) non-zero blocks, etc.
[out] | nMaxBlocks | The maximum number of block matrices fitting in this sparse matrix if it was totally dense |
[out] | nNonZeroBlocks | The number of non-zero blocks |
Definition at line 362 of file srba_types.h.
static void srba::SparseBlockMatrix< Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL >::getSparsityStats | ( | const std::vector< typename base_t::col_t * > & | lstColumns, |
size_t & | nMaxBlocks, | ||
size_t & | nNonZeroBlocks | ||
) | [inline, static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 372 of file srba_types.h.