chol_tridiag_upper: Upper Cholesky decomposition of a tridiagonal matrix.

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Creates the lower Cholesky decomposition of a tridiagonal matrix. The decomposition will be a sparse lower triangular matrix with non-zero elements only on the main diagonal and the diagonal below it.

Usage

1

Arguments

Q

A square tridiagonal matrix.

Value

A sparse square matrix with the same size as the input matrix.

Examples

1
2
3
4
5
6
library(Matrix)
times <- c(1, 4:5, 7)
rho <- 0.5
sigma <- 1
Q <- ar1_prec_irregular(times, rho, sigma)
chol_tridiag_upper(Q)

irregulAR1 documentation built on May 2, 2019, 8:49 a.m.