unitSphere_innerProduct1-class: An S4 class to represent the function...

unitSphere_innerProduct1-classR Documentation

An S4 class to represent the function (\vec{x}\cdot\vec{a})(\vec{x}\cdot\vec{b}) on S^{n-1}

Description

Implementation of the function

f \colon S^{n-1} \to R,\, \vec{x} \mapsto f(\vec{x}) = (\vec{x}\cdot\vec{a})(\vec{x}\cdot\vec{b}),

where n \in \{1,2,3,\ldots\} is the dimension of the integration domain S^{n-1} = \{\vec{x}\in R^n : \Vert \vec{x} \Vert_2 = 1\} and \vec{a} and \vec{b} are two n-dimensional parameter vectors. The integral is known to be

\int_{S^{n-1}} f(\vec{x}) d\vec{x} = \frac{2\pi^{n/2}(\vec{a}\cdot\vec{b})}{n\Gamma(n/2)},

where \vec{a}\in R^n and \vec{b}\in R^n.

Details

Due to the difficulty of testing \Vert \vec{x} \Vert_2 = 1 in floating point arithmetic this class also implements the function "domainCheckP". This allows to pass a list with an additional non-negative parameter "eps" representing a non-negative real number \varepsilon and allows to test 1-\varepsilon \leq \Vert \vec{x} \Vert_2 \leq 1+\varepsilon. See also the documentation of the function "checkUnitSphere" that is used to perform the checks.

The instance needs to be created with three parameters representing the dimension n and the two n-dimensional (real) vectors \vec{a} and \vec{b}.

Slots

dim

An integer that captures the dimension

a

A n-dimensional real vector

b

A n-dimensional real vector

Author(s)

Klaus Herrmann

Examples

n <- as.integer(3)
f <- new("unitSphere_innerProduct1",dim=n,a=c(1,2,3),b=c(-1,-2,-3))

multIntTestFunc documentation built on Sept. 11, 2024, 5:18 p.m.