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

◆ trace_dot() [1/3]

template<typename EigMat1 , typename EigMat2 , require_all_eigen_t< EigMat1, EigMat2 > * = nullptr, require_any_vt_fvar< EigMat1, EigMat2 > * = nullptr>
return_type_t< EigMat1, EigMat2 > stan::math::trace_dot ( EigMat1 &&  A,
EigMat2 &&  B 
)
inline

Compute the trace of the product of two matrices with forward-mode autodiff support.

Template Parameters
EigMat1A type either inheriting from Eigen::DenseBase or a var_value with an inner type inheriting from Eigen::DenseBase
EigMat2A type either inheriting from Eigen::DenseBase or a var_value with an inner type inheriting from Eigen::DenseBase
Parameters
Afirst matrix (m x n)
Bsecond matrix (n x m)
Returns
trace of A * B
Exceptions
std::invalid_argumentif A and B have incompatible dimensions

Definition at line 29 of file trace_dot.hpp.