Learn R Programming

polykde (version 1.1.7)

proj_polysph: 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)

Value

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

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.

Examples

Run this code
# 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))

Run the code above in your browser using DataLab