1#ifndef STAN_MATH_PRIM_FUN_TRACE_GEN_INV_QUAD_FORM_LDLT_HPP
2#define STAN_MATH_PRIM_FUN_TRACE_GEN_INV_QUAD_FORM_LDLT_HPP
33template <
typename EigMat1,
typename T2,
typename EigMat3,
34 require_not_col_vector_t<EigMat1>* =
nullptr,
35 require_all_not_st_var<EigMat1, T2, EigMat3>* =
nullptr>
42 if (D.size() == 0 || A.matrix().size() == 0) {
66template <
typename EigVec,
typename T,
typename EigMat,
74 if (D.size() == 0 || A.matrix().size() == 0) {
LDLT_factor is a structure that holds a matrix of type T and the LDLT of its values.
require_t< is_col_vector< std::decay_t< T > > > require_col_vector_t
Require type satisfies is_col_vector.
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
require_all_not_t< is_var< scalar_type_t< std::decay_t< Types > > >... > require_all_not_st_var
Require none of the scalar types satisfy is_var.
void check_square(const char *function, const char *name, const T_y &y)
Check if the specified matrix is square.
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.
auto multiply(const Mat1 &m1, const Mat2 &m2)
Return the product of the specified matrices.
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.
return_type_t< EigMat1, T2, EigMat3 > trace_gen_inv_quad_form_ldlt(const EigMat1 &D, LDLT_factor< T2 > &A, const EigMat3 &B)
Compute the trace of an inverse quadratic form.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...