Skip to content

num::factor_block_cholesky

Defined in header <linear/factorization/block_tridiagonal.hpp>

block_cholesky_factor factor_block_cholesky(const spmat &A, view<const idx> levels);

Factor a symmetric positive-definite block-tridiagonal matrix.

Only the diagonal and sub-diagonal blocks are used; the super-diagonal blocks are taken to be their transposes, so an input storing both halves and one storing only the lower half factor identically.

Exceptions

  • std::invalid_argument: If A is not square, the level count is wrong, or a nonzero couples non-adjacent blocks.
  • std::runtime_error: If a diagonal block is not positive definite.