Learn R Programming

pdSpecEst (version 1.2.4)

Mid: Geodesic midpoint between HPD matrices

Description

Mid calculates the geodesic midpoint between two HPD matrices under the affine-invariant Riemannian metric as in B09pdSpecEst[Chapter 6].

Usage

Mid(A, B)

Arguments

A, B

Hermitian positive definite matrices (of equal dimension).

References

See Also

pdMean

Examples

Run this code
# NOT RUN {
 ## Generate two random HPD matrices
 a <- matrix(complex(real = rnorm(9), imaginary = rnorm(9)), nrow = 3)
 A <- t(Conj(a)) %*% a
 b <- matrix(complex(real = rnorm(9), imaginary = rnorm(9)), nrow = 3)
 B <- t(Conj(b)) %*% b
 ## Compute midpoint
 Mid(A, B)
 ## Midpoint coincides with two-point intrinsic Karcher mean
 all.equal(pdMean(array(c(A, B), dim = c(3, 3, 2))), Mid(A, B))

# }

Run the code above in your browser using DataLab