diff --git a/include/albatross/src/linalg/block_diagonal.hpp b/include/albatross/src/linalg/block_diagonal.hpp index 942db006..21c9ea10 100644 --- a/include/albatross/src/linalg/block_diagonal.hpp +++ b/include/albatross/src/linalg/block_diagonal.hpp @@ -42,6 +42,8 @@ struct BlockDiagonalLDLT { sqrt_solve(const Eigen::Matrix<_Scalar, _Rows, _Cols> &rhs, ThreadPool *pool) const; + BlockDiagonal sqrt_transpose() const; + std::map block_to_row_map() const; double log_determinant() const; @@ -102,6 +104,13 @@ inline Eigen::Matrix<_Scalar, _Rows, _Cols> BlockDiagonalLDLT::sqrt_solve( return output; } +inline BlockDiagonal BlockDiagonalLDLT::sqrt_transpose() const { + auto sqrt_transpose_block = [](const auto &b) { return b.sqrt_transpose(); }; + BlockDiagonal output; + output.blocks = apply(this->blocks, sqrt_transpose_block); + return output; +} + inline std::map BlockDiagonalLDLT::block_to_row_map() const { Eigen::Index row = 0;