Skip to contents

Checks that p has one coordinate per column of X and lies on the hyperboloid. Since \(H^d\) has an empty cut locus, any such point is a valid base point.

Usage

is_valid_hyperbolic(X, p)

Arguments

X

A matrix or data frame of points on the hyperboloid; rows are samples, with d + 1 columns.

p

Numeric vector of length ncol(X) giving the base point.

Value

Logical: TRUE (invisibly). Stops with an error if p has the wrong length or does not lie on the hyperboloid.

Examples

X <- exp_map_hyperbolic(matrix(rnorm(20), nrow = 10, ncol = 2))
is_valid_hyperbolic(X, p = c(1, 0, 0))