Description Details Slots Examples
Implementation of the function
f \colon S^{n-1} \to R,\, \vec{x} \mapsto f(\vec{x}) = ∏_{i=1}^n x_i^{a_i},
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 a_i \in \{0,1,2,3,…\}, i=1,…,n, are parameters. If at least one of the coefficients a_i is odd, i.e., a_i\in\{1,3,5,7,…\} for at leas one i=1,…,n, the integral is zero, otherwise the integral is known to be
\int_{S^{n-1}} f(\vec{x}) d\vec{x} = 2\frac{∏_{i=1}^nΓ(b_i)}{Γ(∑_{i=1}^n b_i)},
where b_i = (a_i+1)/2.
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 two parameters representing the dimension n and a n-dimensional vector of integers (including 0) representing the exponents.
dim
An integer that captures the dimension
expo
An vector that captures the exponents
1 2 | n <- as.integer(3)
f <- new("unitSphere_polynomial",dim=n,expo=c(1,2,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.