# LLT

class LLT(n:Integer) < Object

Cholesky decomposition of a symmetric positive definite matrix, $S = LL^T$.

The object acts as the matrix $S$, defines conversion to and assignment from Real[_,_], and is intended as more or less a drop-in replacement for that type, albeit sharing, as usual for objects (i.e. copy-by-reference rather than copy-by-value semantics). That sharing permits, for example, multiple multivariate Gaussian distributions to share the same covariance or precision matrix with common posterior updates performed only once.

Various functions, such as solve, have overloads that make use of LLT objects for more efficient computation.

Important

To emphasize, the matrix represented is $S$, not $L$, which is to say, code such as the following:

auto A <- llt(S);
y <- solve(A, x);


computes the matrix-vector product $y = S^{^-1}x$, not $y = L^{-1}x$, however the Cholesky decomposition will be used to solve this more efficiently than a general matrix solve. The point of an LLT object is to maintain the original matrix in a decomposed form for more efficient computation.

### Assignments

Name Description
Real[_,_] Value assignment.

### Conversions

Name Description
Real[_,_] Value conversion.

### Member Functions

Name Description
compute Decompose the matrix positive definite matrix S into this.
update Rank one update (or downdate) of a Cholesky decomposition.

### Member Function Details

#### compute

function compute(S:Real[_,_])

Decompose the matrix positive definite matrix S into this.

#### update

function update(x:Real[_], a:Real)

Rank one update (or downdate) of a Cholesky decomposition.

• x: Vector.
• a: Scalar. Positive for an update, negative for a downdate.

Updates the symmetric positive definite matrix to $S + axx^\top$ with an efficient update of its decomposition.