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

◆ quad_form_sym() [2/5]

template<typename EigMat , typename ColVec , require_eigen_t< EigMat > * = nullptr, require_eigen_col_vector_t< ColVec > * = nullptr, require_any_vt_fvar< EigMat, ColVec > * = nullptr>
return_type_t< EigMat, ColVec > stan::math::quad_form_sym ( const EigMat &  A,
const ColVec &  B 
)
inline

Return the quadratic form \( B^T A B \) of a symmetric matrix.

Template Parameters
EigMattype of the (symmetric) matrix
ColVectype of the vector
Parameters
Asymmetric matrix
Bvector
Returns
The quadratic form (a scalar).
Exceptions
std::invalid_argumentif A is not symmetric, or if A cannot be multiplied by B

Definition at line 56 of file quad_form_sym.hpp.