1#ifndef STAN_MATH_PRIM_FUN_MDIVIDE_LEFT_LDLT_HPP
2#define STAN_MATH_PRIM_FUN_MDIVIDE_LEFT_LDLT_HPP
24template <
typename T,
typename EigMat, require_eigen_t<EigMat>* =
nullptr,
25 require_all_not_st_var<T, EigMat>* =
nullptr,
26 require_any_not_t<std::is_arithmetic<value_type_t<T>>,
27 is_fvar<value_type_t<EigMat>>>* =
nullptr>
28inline Eigen::Matrix<return_type_t<T, EigMat>, Eigen::Dynamic,
29 EigMat::ColsAtCompileTime>
33 if (A.matrix().cols() == 0) {
37 return A.ldlt().solve(
39 EigMat::ColsAtCompileTime>(b));
LDLT_factor is a structure that holds a matrix of type T and the LDLT of its values.
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
void check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Check if the matrices can be multiplied.
Eigen::Matrix< value_type_t< EigMat >, Eigen::Dynamic, EigMat::ColsAtCompileTime > mdivide_left_ldlt(LDLT_factor< T > &A, const EigMat &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...