28#ifndef G2O_LINEAR_SOLVER_DENSE_H
29#define G2O_LINEAR_SOLVER_DENSE_H
31#include <Eigen/Cholesky>
45template <
typename MatrixType>
73 for (
size_t i = 0; i < A.
blockCols().size(); ++i) {
75 assert(c_idx == A.
colBaseOfBlock(i) &&
"mismatch in block indices");
81 for (it = col.begin(); it != col.end(); ++it) {
84 if (it->first <= (
int)i) {
86 H.block(r_idx, c_idx, r_size, c_size) = *(it->second);
88 H.block(c_idx, r_idx, c_size, r_size) = it->second->
transpose();
97 VectorX::MapType xvec(x, m);
98 VectorX::ConstMapType bvec(b, n);
linear solver using dense cholesky decomposition
virtual ~LinearSolverDense()
Eigen::LDLT< MatrixX > _cholesky
bool solve(const SparseBlockMatrix< MatrixType > &A, double *x, double *b)
Sparse matrix which uses blocks.
bool transpose(SparseBlockMatrix< MatrixTransposedType > &dest) const
int colBaseOfBlock(int c) const
where does the col at block-col r starts?
int rowsOfBlock(int r) const
how many rows does the block at block-row r has?
const std::vector< IntBlockMap > & blockCols() const
the block matrices per block-column
std::map< int, SparseMatrixBlock * > IntBlockMap
int cols() const
columns of the matrix
int rowBaseOfBlock(int r) const
where does the row at block-row r starts?
int colsOfBlock(int c) const
how many cols does the block at block-col c has?
MatrixN< Eigen::Dynamic > MatrixX