1#ifndef STAN_MATH_PRIM_FUN_MDIVIDE_RIGHT_LDLT_HPP
2#define STAN_MATH_PRIM_FUN_MDIVIDE_RIGHT_LDLT_HPP
24template <
typename EigMat,
typename T,
25 require_all_matrix_t<EigMat, T>* =
nullptr,
26 require_any_not_st_arithmetic<EigMat, T>* =
nullptr>
47template <
typename EigMat,
typename T,
50inline Eigen::Matrix<double, EigMat::RowsAtCompileTime, T::ColsAtCompileTime>
55 if (A.matrix().rows() == 0) {
59 return A.ldlt().solve(b.transpose()).transpose();
LDLT_factor is a structure that holds a matrix of type T and the LDLT of its values.
require_all_t< std::is_arithmetic< scalar_type_t< std::decay_t< Types > > >... > require_all_st_arithmetic
Require all of the scalar types satisfy std::is_arithmetic.
require_all_t< is_matrix< std::decay_t< Types > >... > require_all_matrix_t
Require all of the types satisfy is_matrix.
auto mdivide_right_ldlt(const EigMat &b, LDLT_factor< T > &A)
Returns the solution of the system xA=b given an LDLT_factor of A.
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.
void check_ldlt_factor(const char *function, const char *name, LDLT_factor< T > &A)
Raise domain error if the specified LDLT factor is invalid.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...