Skip to content

num::linear::make_spd

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

template <class Mat = mat<real>>
with_law<Mat, law::spd> make_spd(Mat A, real tol = 1e-12);

Check symmetric positive definiteness exhaustively by a Cholesky factorization, then attach it.

Exceptions

  • std::invalid_argument: If A is not symmetric within tol, or a pivot is not positive.