comp_ind_dj: Index of spheres on a polysphere

View source: R/utils.R

comp_ind_djR Documentation

Index of spheres on a polysphere

Description

Given Cartesian coordinates of polyspherical data, computes the 0-based indexes at which the Cartesian coordinates for each sphere start and end.

Usage

comp_ind_dj(d)

Arguments

d

vector of size r with dimensions.

Value

A vector of size sum(d) + 1.

Examples

# Example on (S^1)^3
d <- c(1, 1, 1)
comp_ind_dj(d = d)
comp_ind_dj(d = d) + 1

# Example on S^1 x S^2
d <- c(1, 2)
comp_ind_dj(d = d)
comp_ind_dj(d = d) + 1

polykde documentation built on April 16, 2025, 1:11 a.m.