Learn R Programming

FastGP (version 1.2)

rcpp_matrix_ops: Matrix Operations Using Rcpp and RcppEigen

Description

Performs useful matrix operations using Rcpp and RcppEigen.

Usage

rcppeigen_invert_matrix(A) rcppeigen_get_det(A) rcppeigen_get_chol(A) rcppeigen_get_chol_stable(A) rcppeigen_get_chol_diag(A) tinv(A)

Arguments

A
Matrix to perform operation on.

Details

Functions with "rcppeigen" directly call RcppEigen implementations of the associated functions; rcppeigen_get_chol_stable retrieves L and rcppeigen_get_chol_diag(A) retrieves D in A = LDL^T form, whereas rcppeigen_get_chol(A) retrieves L in A = LL^T form. Thanks to Jared Knowles who pointed out that the former variant is more stable (with a potential speed trade-off) and has found it useful for his package merTools. tinv inverts a symmetric Toeplitz matrix using methods from Trench and Durbin from "Matrix Computations" by Golub and Van Loan using Rcpp.

Examples

Run this code
# See demo/FastGPdemo.R

Run the code above in your browser using DataLab