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

◆ quad_form() [2/8]

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 ( const EigMat &  A,
const ColVec &  B 
)
inline

Return the quadratic form \( B^T A B \).

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

Definition at line 54 of file quad_form.hpp.