geo_dist: Geodesic distance between two points on a manifold

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/others.R

Description

Finds the Riemannian distance d(p_1,p_2)=||\textrm{Log}_{p_1}(p_2)|| between two points on the given manifold, provided p_2 is in the domain of \textrm{Log}_{p_1}.

Usage

1
geo_dist(manifold, p1, p2)

Arguments

manifold

Type of manifold ('euclidean', 'sphere', 'hyperbolic', or 'kendall').

p1

A vector (or column matrix) representing a point on the manifold.

p2

A vector (or column matrix) representing a point on the manifold.

Details

On the sphere, -p_1 is not in the domain of \textrm{Log}_{p_1}.

Value

Riemannian distance between p1 and p2.

Author(s)

Ha-Young Shin

See Also

log_map.

Examples

1
2
3
4
5
6
7
p1 <- matrix(rnorm(10), ncol = 2)
p1 <- p1[, 1] + (1i) * p1[, 2]
p1 <- (p1 - mean(p1)) / norm(p1 - mean(p1), type = '2')
p2 <- matrix(rnorm(10), ncol = 2)
p2 <- p2[, 1] + (1i) * p2[, 2]
p2 <- (p2 - mean(p2)) / norm(p2 - mean(p2), type = '2')
geo_dist('kendall', p1, p2)

GeodRegr documentation built on Sept. 5, 2021, 5:17 p.m.

Related to geo_dist in GeodRegr...