unitSphere_innerProduct1-class {multIntTestFunc}R Documentation

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

Description

Implementation of the function

f ⁣:Sn1R,xf(x)=(xa)(xb),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{1,2,3,}n \in \{1,2,3,\ldots\} is the dimension of the integration domain Sn1={xRn:x2=1}S^{n-1} = \{\vec{x}\in R^n : \Vert \vec{x} \Vert_2 = 1\} and a\vec{a} and b\vec{b} are two nn-dimensional parameter vectors. The integral is known to be

Sn1f(x)dx=2πn/2(ab)nΓ(n/2),\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 aRn\vec{a}\in R^n and bRn\vec{b}\in R^n.

Details

Due to the difficulty of testing x2=1\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εx21+ε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 nn and the two nn-dimensional (real) vectors a\vec{a} and b\vec{b}.

Slots

dim

An integer that captures the dimension

a

A nn-dimensional real vector

b

A nn-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))

[Package multIntTestFunc version 0.2.0 Index]