Description Details Slots Examples
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,…\} 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π^{n/2}(\vec{a}\cdot\vec{b})}{nΓ(n/2)},
where \vec{a}\in R^n and \vec{b}\in R^n.
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 ≤q \Vert \vec{x} \Vert_2 ≤q 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}.
dim
An integer that captures the dimension
a
A n-dimensional real vector
b
A n-dimensional real vector
1 2 | n <- as.integer(3)
f <- new("unitSphere_innerProduct1",dim=n,a=c(1,2,3),b=c(-1,-2,-3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.