Skip to contents

Checks whether every value of X lies in \([0,1)\), the torus representation expected by the torus functions of this package (see manifold_torus).

Usage

is_in_torus(X)

Arguments

X

A matrix or data frame of (nominally) torus data.

Value

Logical: TRUE if every value of X lies in \([0,1)\), FALSE otherwise.

Examples

X <- matrix(runif(20), nrow = 10, ncol = 2)
is_in_torus(X)
#> [1] TRUE

Y <- matrix(rnorm(20), nrow = 10, ncol = 2)  # not in [0,1)
is_in_torus(Y)
#> [1] FALSE