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).` This is the overload for arithmetic types to allow Eigen's expression templates to be used for efficiency.
- Template Parameters
-
EigMatD | type of the first matrix or expression |
EigMatA | type of the second matrix or expression |
EigMatB | 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 66 of file trace_gen_quad_form.hpp.