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

◆ quad_form() [6/8]

template<typename EigMat , typename ColVec , require_eigen_t< EigMat > * = nullptr, require_eigen_col_vector_t< ColVec > * = nullptr, require_any_vt_var< EigMat, ColVec > * = nullptr>
var stan::math::quad_form ( const EigMat &  A,
const ColVec &  B,
bool  symmetric = false 
)
inline

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

Template Parameters
EigMattype of the matrix
ColVectype of the vector
Parameters
Asquare matrix
Bvector
symmetricindicates whether the output should be made symmetric
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 274 of file quad_form.hpp.