d_unif_polysph: Density of the uniform distribution on the polysphere

View source: R/distr.R

d_unif_polysphR Documentation

Density of the uniform distribution on the polysphere

Description

Computes the density of the uniform distribution on the polysphere.

Usage

d_unif_polysph(x, d, log = FALSE)

Arguments

x

a matrix of size c(nx, sum(d) + r) with the evaluation points.

d

vector of size r with dimensions.

log

compute the logarithm of the density? Defaults to FALSE.

Value

A vector of size nx with the evaluated density.

Examples

# Simple check of integration on S^1 x S^2
d <- c(1, 2)
x <- r_unif_polysph(n = 1e4, d = d)
mean(1 / d_unif_polysph(x = x, d = d)) / prod(rotasym::w_p(p = d + 1))

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