1#ifndef STAN_MATH_PRIM_FUN_CHOL2INV_HPP
2#define STAN_MATH_PRIM_FUN_CHOL2INV_HPP
22template <
typename T, require_eigen_t<T>* =
nullptr>
24 const Eigen::Ref<const plain_type_t<T>>& L_ref = L;
37 return crossprod(mdivide_left_tri<Eigen::Lower>(L_ref));
void check_square(const char *function, const char *name, const T_y &y)
Check if the specified matrix is square.
fvar< T > inv_square(const fvar< T > &x)
plain_type_t< T > chol2inv(const T &L)
Returns the inverse of the matrix whose Cholesky factor is L.
matrix_cl< typename std::decay_t< T_A >::Scalar > crossprod(T_A &&A)
Returns the result of pre-multiplying a matrix by its own transpose.
void check_lower_triangular(const char *function, const char *name, const T_y &y)
Check if the specified matrix is lower triangular.
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...