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

◆ quad_form() [4/8]

template<typename EigMat , typename ColVec , require_eigen_t< EigMat > * = nullptr, require_eigen_col_vector_t< ColVec > * = nullptr, require_vt_same< EigMat, ColVec > * = nullptr, require_all_vt_arithmetic< EigMat, ColVec > * = nullptr>
value_type_t< EigMat > 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 55 of file quad_form.hpp.