Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ trace_gen_inv_quad_form_ldlt() [1/4]

template<typename EigMat1 , typename T2 , typename EigMat3 , require_not_col_vector_t< EigMat1 > * = nullptr, require_all_not_st_var< EigMat1, T2, EigMat3 > * = nullptr>
return_type_t< EigMat1, T2, EigMat3 > stan::math::trace_gen_inv_quad_form_ldlt ( const EigMat1 &  D,
LDLT_factor< T2 > &  A,
const EigMat3 &  B 
)
inline

Compute the trace of an inverse quadratic form.

I.E., this computes trace(D B^T A^-1 B) where D is a square matrix and the LDLT_factor of A is provided.

Template Parameters
EigMat1type of the first matrix
T2type of matrix in the LDLT_factor
EigMat3type of the third matrix
Parameters
Dmultiplier
ALDLT_factor
Binner term in quadratic form
Returns
trace(D * B^T * A^-1 * B)
Exceptions
std::domain_errorif D is not square
std::domain_errorif A cannot be multiplied by B or B cannot be multiplied by D.

Definition at line 36 of file trace_gen_inv_quad_form_ldlt.hpp.