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.
This overload handles arguments where one of Mat1 or Mat2 are var_value<T>
where T
is an Eigen type. The other type can also be a var_value
or it can be a matrix type that inherits from EigenBase
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 311 of file quad_form.hpp.