template<typename TD , typename TA , typename TB , typename = require_all_eigen_t<TD, TA, TB>, typename = require_all_not_vt_var<TD, TA, TB>, typename = require_any_not_vt_arithmetic<TD, TA, TB>>
auto stan::math::trace_gen_quad_form |
( |
const TD & |
D, |
|
|
const TA & |
A, |
|
|
const TB & |
B |
|
) |
| |
|
inline |
Return the trace of D times the quadratic form of B and A.
That is, ‘trace_gen_quad_form(D, A, B) = trace(D * B’ * A * B).`
- Template Parameters
-
TD | type of the first matrix or expression |
TA | type of the second matrix or expression |
TB | type of the third matrix or expression |
- Parameters
-
D | multiplier |
A | outside term in quadratic form |
B | inner term in quadratic form |
- Returns
- trace(D * B' * A * B)
- Exceptions
-
std::domain_error | if A or D is not square |
std::domain_error | if A cannot be multiplied by B or B cannot be multiplied by D. |
Definition at line 36 of file trace_gen_quad_form.hpp.