# rank_update

function rank_update(S:LLT, x:Real[_], a:Real) -> LLT

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

• S: Existing Cholesky decomposition of the symmetric positive definite matrix $S$.
• x: Vector $x$.
• a: Scalar $a$. Positive for an update, negative for a downdate.

Returns: A new Cholesky decomposition of the symmetric positive definite matrix $S + axx^\top$.

function rank_update(S:LLT, X:Real[_,_], a:Real) -> LLT

Rank $k$ update (or downdate) of a Cholesky decomposition.

• S: Existing Cholesky decomposition of the symmetric positive definite matrix $S$.
• X: Matrix $X$.
• a: Scalar $a$. Positive for an update, negative for a downdate.

Returns: A new Cholesky decomposition of the symmetric positive definite matrix $S + aXX^\top$.

The computation is performed as $k$ separate rank-1 updates using the columns of `X