Compute the trace of an inverse quadratic form.
I.E., this computes trace(diag(D) B^T A^-1 B)
where D is the diagonal of a diagonal matrix (diag(D)
is the diagonal matrix itself) and the LDLT_factor of A is provided.
- Template Parameters
-
Td | type of the diagonal of first matrix |
Ta | type of matrix in the LDLT_factor |
Tb | type of the B matrix |
- Parameters
-
D | diagonal of multiplier |
A | LDLT_factor |
B | inner term in quadratic form |
- Returns
- trace(diag(D) * B^T * A^-1 * B)
- Exceptions
-
std::domain_error | if A cannot be multiplied by B or B cannot be multiplied by diag(D). |
Definition at line 191 of file trace_gen_inv_quad_form_ldlt.hpp.