28 #ifndef G2O_LINEAR_SOLVER_DENSE_H 29 #define G2O_LINEAR_SOLVER_DENSE_H 37 #include<Eigen/Cholesky> 45 template <
typename MatrixType>
82 for (
size_t i = 0; i < A.
blockCols().size(); ++i) {
84 assert(c_idx == A.
colBaseOfBlock(i) &&
"mismatch in block indices");
89 for (it = col.begin(); it != col.end(); ++it) {
92 if (it->first <= (
int)i) {
94 H.block(r_idx, c_idx, r_size, c_size) = *(it->second);
96 H.block(c_idx, r_idx, c_size, r_size) = it->second->
transpose();
105 VectorXD::MapType xvec(x, m);
106 VectorXD::ConstMapType bvec(b, n);
bool transpose(SparseBlockMatrix< MatrixTransposedType > *&dest) const
transposes a block matrix, The transposed type should match the argument false on failure ...
int rowsOfBlock(int r) const
how many rows does the block at block-row r has?
int cols() const
columns of the matrix
bool solve(const SparseBlockMatrix< MatrixType > &A, double *x, double *b)
int colsOfBlock(int c) const
how many cols does the block at block-col c has?
linear solver using dense cholesky decomposition
Eigen::LDLT< MatrixXD > _cholesky
std::map< int, SparseMatrixBlock * > IntBlockMap
int colBaseOfBlock(int c) const
where does the col at block-col r starts?
const std::vector< IntBlockMap > & blockCols() const
the block matrices per block-column
virtual ~LinearSolverDense()
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixXD
int rowBaseOfBlock(int r) const
where does the row at block-row r starts?
Sparse matrix which uses blocks.