Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ trace_quad_form() [2/3]

template<typename EigMat1 , typename EigMat2 , require_all_eigen_vt< std::is_arithmetic, EigMat1, EigMat2 > * = nullptr>
return_type_t< EigMat1, EigMat2 > stan::math::trace_quad_form ( const EigMat1 &  A,
const EigMat2 &  B 
)
inline

Compute trace(B^T A B).

Template Parameters
EigMat1type of the first matrix
EigMat2type of the second matrix
Parameters
Amatrix
Bmatrix
Returns
The trace of B^T A B
Exceptions
std::domain_errorif A is not square
std::domain_errorif A cannot be multiplied by B

Definition at line 26 of file trace_quad_form.hpp.