Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ cholesky_decompose() [3/5]

template<typename EigMat , require_eigen_t< EigMat > * = nullptr, require_not_eigen_vt< is_var, EigMat > * = nullptr>
Eigen::Matrix< value_type_t< EigMat >, EigMat::RowsAtCompileTime, EigMat::ColsAtCompileTime > stan::math::cholesky_decompose ( const EigMat &  m)
inline

Return the lower-triangular Cholesky factor (i.e., matrix square root) of the specified square, symmetric matrix.

The return value \(L\) will be a lower-triangular matrix such that the original matrix \(A\) is given by

\(A = L \times L^EigMat\).

Template Parameters
EigMattype of the matrix (must be derived from Eigen::MatrixBase)
Parameters
mSymmetric matrix.
Returns
Square root of matrix.
Note
Because OpenCL only works on doubles there are two cholesky_decompose functions. One that works on doubles and another that works on all other types (this one).
Exceptions
std::domain_errorif m is not a symmetric matrix or if m is not positive definite (if m has more than 0 elements)

Definition at line 33 of file cholesky_decompose.hpp.