chol_update: Rank-one Update of Cholesky Decomposition

Description Usage Arguments Value Examples

View source: R/update.R

Description

Given the lower triangular matrix L obtained from the Cholesky decomposition of A, function chol_update updates L such that it corresponds to the decomposition of A + u*u'.

Usage

1

Arguments

L

A lower triangular matrix. Strictly upper diagonal part is not referenced.

u

A vector with with length matching with the dimensions of L.

Value

Updated L.

Examples

1
2
3
4
L <- matrix(c(4,3,0,5), 2, 2)
u <- c(1, 2)
chol_update(L, u)
t(chol(L %*% t(L) + u %*% t(u)))

ramcmc documentation built on Oct. 7, 2021, 1:07 a.m.