This function computes the Riemannian exponential map for the Affine-Invariant Riemannian Metric (AIRM).
airm_exp(sigma, v)
A symmetric positive-definite matrix of class dppMatrix
.
if (requireNamespace("Matrix", quietly = TRUE)) {
library(Matrix)
sigma <- diag(2) |>
Matrix::nearPD() |>
_$mat |>
Matrix::pack()
v <- diag(c(1, 0.5)) |>
Matrix::symmpart() |>
Matrix::pack()
airm_exp(sigma, v)
}
#> 2 x 2 Matrix of class "dppMatrix"
#> [,1] [,2]
#> [1,] 2.718282 0.000000
#> [2,] 0.000000 1.648721