proj_polysph: Projection onto the polysphere

View source: R/RcppExports.R

proj_polysphR Documentation

Projection onto the polysphere

Description

Projects points on \mathbb{R}^{d_1 + \cdots + d_r + r} onto the polysphere \mathcal{S}^{d_1} \times \cdots \times \mathcal{S}^{d_r} by normalizing each block of d_j coordinates.

Usage

proj_polysph(x, ind_dj)

Arguments

x

a matrix of size c(n, sum(d) + r).

ind_dj

0-based index separating the blocks of spheres that is computed with comp_ind_dj.

Value

A matrix of size c(n, sum(d) + r) with the projected points.

Examples

# Example on (S^1)^2
d <- c(1, 1)
x <- rbind(c(2, 0, 1, 1))
proj_polysph(x, ind_dj = comp_ind_dj(d))

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