1#ifndef STAN_MATH_FWD_FUN_TRACE_QUAD_FORM_HPP
2#define STAN_MATH_FWD_FUN_TRACE_QUAD_FORM_HPP
15template <
typename EigMat1,
typename EigMat2,
16 require_all_eigen_t<EigMat1, EigMat2>* =
nullptr,
17 require_any_vt_fvar<EigMat1, EigMat2>* =
nullptr>
22 const auto& B_ref =
to_ref(B);
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
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.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
return_type_t< EigMat1, EigMat2 > trace_quad_form(const EigMat1 &A, const EigMat2 &B)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...