airm_log: Compute the AIRM Logarithm

View source: R/airm.R

airm_logR Documentation

Compute the AIRM Logarithm

Description

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

Usage

airm_log(sigma, lambda, validate = FALSE)

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.

validate

A logical value indicating whether to validate input arguments. Default is FALSE.

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)
}

riemtan documentation built on Nov. 11, 2025, 1:06 a.m.