Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Return the quadratic form \( B^T A B \).
Symmetry of the resulting matrix is not guaranteed due to numerical precision.
Mat1 | type of the first (square) matrix |
Mat2 | type of the second matrix |
A | square matrix |
B | second matrix |
symmetric | indicates whether the output should be made symmetric |
std::invalid_argument | if A is not square, or if A cannot be multiplied by B |
Definition at line 117 of file quad_form.hpp.