This function computes the Riemannian logarithmic map for the Affine-Invariant Riemannian Metric (AIRM).

airm_log(sigma, lambda)

Arguments

sigma

A symmetric positive-definite matrix of class dppMatrix, representing the reference point.

lambda

A symmetric positive-definite matrix of class dppMatrix, representing the target point.

Value

A symmetric matrix of class dspMatrix, representing the tangent space image of lambda at sigma.

Examples

if (requireNamespace("Matrix", quietly = TRUE)) {
  library(Matrix)
  sigma <- diag(2) |>
    Matrix::nearPD() |>
    _$mat |>
    Matrix::pack()
  lambda <- diag(c(2, 3)) |>
    Matrix::nearPD() |>
    _$mat |>
    Matrix::pack()
  airm_log(sigma, lambda)
}
#> 2 x 2 Matrix of class "dspMatrix"
#>           [,1]     [,2]
#> [1,] 0.6931472 0.000000
#> [2,] 0.0000000 1.098612