cholesky_decompose: The Cholesky Decomposition

View source: R/gp_functions.R

cholesky_decomposeR Documentation

The Cholesky Decomposition

Description

Compute the Cholesky factorization of a real, symmetric, positive-definite square matrix. Returns the lower-left triangular matrix to match Stan's version. This function is simply an opinionated wrapper of the base R function, chol().

Usage

cholesky_decompose(x, ...)

Arguments

x

A symmetric, positive-definite square matrix.

...

Additional parameters to pass to chol().

Value

A lower-triangular square matrix the same size as x.

Examples

x <- matrix(c(2, 1, 1, 2), nrow = 2)
cholesky_decompose(x)

markjrieke/riekelib documentation built on Dec. 20, 2024, 4:57 a.m.