qform: Efficient Computation of Quadratic Form

Description Usage Arguments

Description

Evaluates the quadratic form x'Ax using optimized cross products. An upper triangular matrix with U'U = A can also be given to dramatically increase speed.

Usage

1
qform(x, A, U)

Arguments

x

a vector

A

a matrix. Only one of A and U needs to be provided.

U

an upper triangular matrix. Note that plugging in chol(A) is slower.


wzhorton/hortonlib documentation built on May 9, 2019, 8:19 a.m.