Evaluate a matrix-induced bilinear form
Source:R/03_03_DeCovarT_estimate_ratios_frequentist.R
dot-bilinear_form.RdComputes \(\boldsymbol{x}^{\mathsf{T}}\boldsymbol{A}\boldsymbol{y}\). When \(\boldsymbol{A}\) is symmetric positive definite (as for a non-degenerate Gaussian covariance or precision), this is the \(\boldsymbol{A}\)-inner product. Prefer this name over "dot product", which is reserved for \(\boldsymbol{x}^{\mathsf{T}}\boldsymbol{y}\).
Details
Implementation uses base::crossprod() as
drop(crossprod(x, A %*% y)), which is the standard efficient route to
a bilinear / quadratic form in R (avoids an explicit transpose of
\(\boldsymbol{x}\) and a temporary outer product).