Title: | Provides Test Functions for Multivariate Integration |
---|---|
Description: | Provides implementations of functions that can be used to test multivariate integration routines. The package covers six different integration domains (unit hypercube, unit ball, unit sphere, standard simplex, non-negative real numbers and R^n). For each domain several functions with different properties (smooth, non-differentiable, ...) are available. The functions are available in all dimensions n >= 1. For each function the exact value of the integral is known and implemented to allow testing the accuracy of multivariate integration routines. Details on the available test functions can be found at on the development website. |
Authors: | Klaus Herrmann [aut, cre] |
Maintainer: | Klaus Herrmann <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.0 |
Built: | 2024-11-08 05:28:56 UTC |
Source: | https://github.com/klausherrmann/multinttestfunc |
The function checks if a point (one row in the input argument) is inside the closed unit ball or not.
If the input matrix contains entries that are not numeric, i.e., not representing real numbers, the function throws an error.
The dimension
is automatically inferred from the input matrix and is equal to the number of columns.
checkClosedUnitBall(x)
checkClosedUnitBall(x)
x |
Matrix with numeric entries. Each row represents one point |
Vector where each element (TRUE or FALSE) indicates if a point is in the closed unit ball
Klaus Herrmann
x <- matrix(rnorm(30),10,3) checkClosedUnitBall(x)
x <- matrix(rnorm(30),10,3) checkClosedUnitBall(x)
The function checks if a point (one row in the input argument) is inside the closed unit hypercube or not.
If the input matrix contains entries that are not numeric, i.e., not representing real numbers, the function throws an error.
The dimension
is automatically inferred from the input matrix and is equal to the number of columns.
checkClosedUnitCube(x)
checkClosedUnitCube(x)
x |
Matrix with numeric entries. Each row represents one point |
Vector where each element (TRUE or FALSE) indicates if a point is in the unit hypercube
Klaus Herrmann
x <- matrix(rnorm(30),10,3) checkClosedUnitCube(x)
x <- matrix(rnorm(30),10,3) checkClosedUnitCube(x)
The function checks if a point (one row in the input argument) is inside or not.
In this case the return values are all TRUE.
If the input matrix contains entries that are not numeric, i.e., not representing real numbers, the function throws an error.
The dimension
is automatically inferred from the input matrix and is equal to the number of columns.
checkPos(x)
checkPos(x)
x |
Matrix with numeric entries. Each row represents one point |
Vector where each element (TRUE or FALSE) indicates if a point is in
Klaus Herrmann
x <- matrix(rexp(30,rate=1),10,3) checkPos(x)
x <- matrix(rexp(30,rate=1),10,3) checkPos(x)
The function checks if a point (one row in the input argument) is inside the n-dimensional Euclidean space or not.
In this case the return values are all TRUE.
If the input matrix contains entries that are not numeric, i.e., not representing real numbers, the function throws an error.
The dimension
is automatically inferred from the input matrix and is equal to the number of columns.
checkRn(x)
checkRn(x)
x |
Matrix with numeric entries. Each row represents one point |
Vector where each element (TRUE or FALSE) indicates if a point is in R^n
Klaus Herrmann
x <- matrix(rnorm(30),10,3) checkRn(x)
x <- matrix(rnorm(30),10,3) checkRn(x)
The function checks if a point (one row in the input argument) is inside the standard simplex or not.
If the input matrix contains entries that are not numeric, i.e., not representing real numbers, the function throws an error.
The dimension
is automatically inferred from the input matrix and is equal to the number of columns.
checkStandardSimplex(x)
checkStandardSimplex(x)
x |
Matrix with numeric entries. Each row represents one point |
Vector where each element (TRUE or FALSE) indicates if a point is in the standard simplex
Klaus Herrmann
x <- matrix(rnorm(30),10,3) checkStandardSimplex(x)
x <- matrix(rnorm(30),10,3) checkStandardSimplex(x)
The function checks if a point (one row in the input argument) is inside the unit sphere or not.
If the input matrix contains entries that are not numeric, i.e., not representing real numbers, the function throws an error.
The dimension
is automatically inferred from the input matrix and is equal to the number of columns.
The function allows for an additional parameter
to test
.
WARNING: Due to floating point arithmetic the default value of
will not work properly in most cases.
checkUnitSphere(x, eps = 0)
checkUnitSphere(x, eps = 0)
x |
Matrix with numeric entries. Each row represents one point |
eps |
Non-negative numeric that allows to test points with an additional tolerance |
Vector where each element (TRUE or FALSE) indicates if a point is in the unit sphere
Klaus Herrmann
x <- matrix(rnorm(30),10,3) checkUnitSphere(x,eps=0.001)
x <- matrix(rnorm(30),10,3) checkUnitSphere(x,eps=0.001)
domainCheck is a generic function that allows to test if a collection of evaluation points are inside the integration domain associated to the test function instance or not.
domainCheck(object, x) ## S4 method for signature 'Pn_lognormalDensity,matrix' domainCheck(object, x) ## S4 method for signature 'Pn_logtDensity,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_Gauss,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_floorNorm,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_normalDensity,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_tDensity,matrix' domainCheck(object, x) ## S4 method for signature 'standardSimplex_Dirichlet,matrix' domainCheck(object, x) ## S4 method for signature 'standardSimplex_exp_sum,matrix' domainCheck(object, x) ## S4 method for signature 'unitBall_normGauss,matrix' domainCheck(object, x) ## S4 method for signature 'unitBall_polynomial,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN1,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN2,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN3,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN4,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_Genz1,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_cos2,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_floor,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_max,matrix' domainCheck(object, x) ## S4 method for signature 'unitSphere_innerProduct1,matrix' domainCheck(object, x) ## S4 method for signature 'unitSphere_polynomial,matrix' domainCheck(object, x)
domainCheck(object, x) ## S4 method for signature 'Pn_lognormalDensity,matrix' domainCheck(object, x) ## S4 method for signature 'Pn_logtDensity,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_Gauss,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_floorNorm,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_normalDensity,matrix' domainCheck(object, x) ## S4 method for signature 'Rn_tDensity,matrix' domainCheck(object, x) ## S4 method for signature 'standardSimplex_Dirichlet,matrix' domainCheck(object, x) ## S4 method for signature 'standardSimplex_exp_sum,matrix' domainCheck(object, x) ## S4 method for signature 'unitBall_normGauss,matrix' domainCheck(object, x) ## S4 method for signature 'unitBall_polynomial,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN1,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN2,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN3,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_BFN4,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_Genz1,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_cos2,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_floor,matrix' domainCheck(object, x) ## S4 method for signature 'unitCube_max,matrix' domainCheck(object, x) ## S4 method for signature 'unitSphere_innerProduct1,matrix' domainCheck(object, x) ## S4 method for signature 'unitSphere_polynomial,matrix' domainCheck(object, x)
object |
Test function that gets evaluated |
x |
Matrix where each row represents one evaluation point |
Vector where each element (TRUE or FALSE) indicates if a point (row in the input matrix) is in the integration domain
Klaus Herrmann
domainCheckP is a generic function that allows to test if a collection of evaluation points are inside the integration domain associated to the test function instance or not. This "overload" of domainCheck allows to pass a list of additional parameters.
domainCheckP(object, x, param) ## S4 method for signature 'unitSphere_innerProduct1,matrix,list' domainCheckP(object, x, param) ## S4 method for signature 'unitSphere_polynomial,matrix,list' domainCheckP(object, x, param)
domainCheckP(object, x, param) ## S4 method for signature 'unitSphere_innerProduct1,matrix,list' domainCheckP(object, x, param) ## S4 method for signature 'unitSphere_polynomial,matrix,list' domainCheckP(object, x, param)
object |
Test function that gets evaluated |
x |
Matrix where each row represents one evaluation point |
param |
List of additional parameters |
Vector where each element (TRUE or FALSE) indicates if a point (row in the input matrix) is in the integration domain
Klaus Herrmann
evaluate is a generic function that evaluates the test function instance for a collection of evaluation points represented by a matrix. Each row is one evaluation point.
evaluate(object, x) ## S4 method for signature 'Pn_lognormalDensity,matrix' evaluate(object, x) ## S4 method for signature 'Pn_logtDensity,ANY' evaluate(object, x) ## S4 method for signature 'Rn_Gauss,matrix' evaluate(object, x) ## S4 method for signature 'Rn_floorNorm,matrix' evaluate(object, x) ## S4 method for signature 'Rn_normalDensity,matrix' evaluate(object, x) ## S4 method for signature 'Rn_tDensity,ANY' evaluate(object, x) ## S4 method for signature 'standardSimplex_Dirichlet,matrix' evaluate(object, x) ## S4 method for signature 'standardSimplex_exp_sum,matrix' evaluate(object, x) ## S4 method for signature 'unitBall_normGauss,matrix' evaluate(object, x) ## S4 method for signature 'unitBall_polynomial,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN1,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN2,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN3,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN4,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_Genz1,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_cos2,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_floor,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_max,matrix' evaluate(object, x) ## S4 method for signature 'unitSphere_innerProduct1,matrix' evaluate(object, x) ## S4 method for signature 'unitSphere_polynomial,matrix' evaluate(object, x)
evaluate(object, x) ## S4 method for signature 'Pn_lognormalDensity,matrix' evaluate(object, x) ## S4 method for signature 'Pn_logtDensity,ANY' evaluate(object, x) ## S4 method for signature 'Rn_Gauss,matrix' evaluate(object, x) ## S4 method for signature 'Rn_floorNorm,matrix' evaluate(object, x) ## S4 method for signature 'Rn_normalDensity,matrix' evaluate(object, x) ## S4 method for signature 'Rn_tDensity,ANY' evaluate(object, x) ## S4 method for signature 'standardSimplex_Dirichlet,matrix' evaluate(object, x) ## S4 method for signature 'standardSimplex_exp_sum,matrix' evaluate(object, x) ## S4 method for signature 'unitBall_normGauss,matrix' evaluate(object, x) ## S4 method for signature 'unitBall_polynomial,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN1,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN2,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN3,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_BFN4,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_Genz1,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_cos2,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_floor,matrix' evaluate(object, x) ## S4 method for signature 'unitCube_max,matrix' evaluate(object, x) ## S4 method for signature 'unitSphere_innerProduct1,matrix' evaluate(object, x) ## S4 method for signature 'unitSphere_polynomial,matrix' evaluate(object, x)
object |
Test function that gets evaluated |
x |
Matrix where each row represents one evaluation point |
Vector where each element is an evaluation of the test function for a node point (row in x)
Klaus Herrmann
exactIntegral is a generic function that allows to calculate the exact value of a test function instance over the associated integration domain.
exactIntegral(object) ## S4 method for signature 'Pn_lognormalDensity' exactIntegral(object) ## S4 method for signature 'Pn_logtDensity' exactIntegral(object) ## S4 method for signature 'Rn_Gauss' exactIntegral(object) ## S4 method for signature 'Rn_floorNorm' exactIntegral(object) ## S4 method for signature 'Rn_normalDensity' exactIntegral(object) ## S4 method for signature 'Rn_tDensity' exactIntegral(object) ## S4 method for signature 'standardSimplex_Dirichlet' exactIntegral(object) ## S4 method for signature 'standardSimplex_exp_sum' exactIntegral(object) ## S4 method for signature 'unitBall_normGauss' exactIntegral(object) ## S4 method for signature 'unitBall_polynomial' exactIntegral(object) ## S4 method for signature 'unitCube_BFN1' exactIntegral(object) ## S4 method for signature 'unitCube_BFN2' exactIntegral(object) ## S4 method for signature 'unitCube_BFN3' exactIntegral(object) ## S4 method for signature 'unitCube_BFN4' exactIntegral(object) ## S4 method for signature 'unitCube_Genz1' exactIntegral(object) ## S4 method for signature 'unitCube_cos2' exactIntegral(object) ## S4 method for signature 'unitCube_floor' exactIntegral(object) ## S4 method for signature 'unitCube_max' exactIntegral(object) ## S4 method for signature 'unitSphere_innerProduct1' exactIntegral(object) ## S4 method for signature 'unitSphere_polynomial' exactIntegral(object)
exactIntegral(object) ## S4 method for signature 'Pn_lognormalDensity' exactIntegral(object) ## S4 method for signature 'Pn_logtDensity' exactIntegral(object) ## S4 method for signature 'Rn_Gauss' exactIntegral(object) ## S4 method for signature 'Rn_floorNorm' exactIntegral(object) ## S4 method for signature 'Rn_normalDensity' exactIntegral(object) ## S4 method for signature 'Rn_tDensity' exactIntegral(object) ## S4 method for signature 'standardSimplex_Dirichlet' exactIntegral(object) ## S4 method for signature 'standardSimplex_exp_sum' exactIntegral(object) ## S4 method for signature 'unitBall_normGauss' exactIntegral(object) ## S4 method for signature 'unitBall_polynomial' exactIntegral(object) ## S4 method for signature 'unitCube_BFN1' exactIntegral(object) ## S4 method for signature 'unitCube_BFN2' exactIntegral(object) ## S4 method for signature 'unitCube_BFN3' exactIntegral(object) ## S4 method for signature 'unitCube_BFN4' exactIntegral(object) ## S4 method for signature 'unitCube_Genz1' exactIntegral(object) ## S4 method for signature 'unitCube_cos2' exactIntegral(object) ## S4 method for signature 'unitCube_floor' exactIntegral(object) ## S4 method for signature 'unitCube_max' exactIntegral(object) ## S4 method for signature 'unitSphere_innerProduct1' exactIntegral(object) ## S4 method for signature 'unitSphere_polynomial' exactIntegral(object)
object |
The test function that gets evaluated |
Numeric value of the integral of the test function
Klaus Herrmann
getIntegrationDomain is a generic function that returns a description of the integration domain associate to the test function instance.
getIntegrationDomain(object) ## S4 method for signature 'Pn_lognormalDensity' getIntegrationDomain(object) ## S4 method for signature 'Pn_logtDensity' getIntegrationDomain(object) ## S4 method for signature 'Rn_Gauss' getIntegrationDomain(object) ## S4 method for signature 'Rn_floorNorm' getIntegrationDomain(object) ## S4 method for signature 'Rn_normalDensity' getIntegrationDomain(object) ## S4 method for signature 'Rn_tDensity' getIntegrationDomain(object) ## S4 method for signature 'standardSimplex_Dirichlet' getIntegrationDomain(object) ## S4 method for signature 'standardSimplex_exp_sum' getIntegrationDomain(object) ## S4 method for signature 'unitBall_normGauss' getIntegrationDomain(object) ## S4 method for signature 'unitBall_polynomial' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN1' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN2' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN3' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN4' getIntegrationDomain(object) ## S4 method for signature 'unitCube_Genz1' getIntegrationDomain(object) ## S4 method for signature 'unitCube_cos2' getIntegrationDomain(object) ## S4 method for signature 'unitCube_floor' getIntegrationDomain(object) ## S4 method for signature 'unitCube_max' getIntegrationDomain(object) ## S4 method for signature 'unitSphere_innerProduct1' getIntegrationDomain(object) ## S4 method for signature 'unitSphere_polynomial' getIntegrationDomain(object)
getIntegrationDomain(object) ## S4 method for signature 'Pn_lognormalDensity' getIntegrationDomain(object) ## S4 method for signature 'Pn_logtDensity' getIntegrationDomain(object) ## S4 method for signature 'Rn_Gauss' getIntegrationDomain(object) ## S4 method for signature 'Rn_floorNorm' getIntegrationDomain(object) ## S4 method for signature 'Rn_normalDensity' getIntegrationDomain(object) ## S4 method for signature 'Rn_tDensity' getIntegrationDomain(object) ## S4 method for signature 'standardSimplex_Dirichlet' getIntegrationDomain(object) ## S4 method for signature 'standardSimplex_exp_sum' getIntegrationDomain(object) ## S4 method for signature 'unitBall_normGauss' getIntegrationDomain(object) ## S4 method for signature 'unitBall_polynomial' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN1' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN2' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN3' getIntegrationDomain(object) ## S4 method for signature 'unitCube_BFN4' getIntegrationDomain(object) ## S4 method for signature 'unitCube_Genz1' getIntegrationDomain(object) ## S4 method for signature 'unitCube_cos2' getIntegrationDomain(object) ## S4 method for signature 'unitCube_floor' getIntegrationDomain(object) ## S4 method for signature 'unitCube_max' getIntegrationDomain(object) ## S4 method for signature 'unitSphere_innerProduct1' getIntegrationDomain(object) ## S4 method for signature 'unitSphere_polynomial' getIntegrationDomain(object)
object |
Test function for which the description is returned |
Description of the integration domain of the function
Klaus Herrmann
getReferences is a generic function that returns a vector of references associated to the test function instance.
getReferences(object) ## S4 method for signature 'Pn_lognormalDensity' getReferences(object) ## S4 method for signature 'Pn_logtDensity' getReferences(object) ## S4 method for signature 'Rn_Gauss' getReferences(object) ## S4 method for signature 'Rn_floorNorm' getReferences(object) ## S4 method for signature 'Rn_normalDensity' getReferences(object) ## S4 method for signature 'Rn_tDensity' getReferences(object) ## S4 method for signature 'standardSimplex_Dirichlet' getReferences(object) ## S4 method for signature 'standardSimplex_exp_sum' getReferences(object) ## S4 method for signature 'unitBall_normGauss' getReferences(object) ## S4 method for signature 'unitBall_polynomial' getReferences(object) ## S4 method for signature 'unitCube_BFN1' getReferences(object) ## S4 method for signature 'unitCube_BFN2' getReferences(object) ## S4 method for signature 'unitCube_BFN3' getReferences(object) ## S4 method for signature 'unitCube_BFN4' getReferences(object) ## S4 method for signature 'unitCube_Genz1' getReferences(object) ## S4 method for signature 'unitCube_cos2' getReferences(object) ## S4 method for signature 'unitCube_floor' getReferences(object) ## S4 method for signature 'unitCube_max' getReferences(object) ## S4 method for signature 'unitSphere_innerProduct1' getReferences(object) ## S4 method for signature 'unitSphere_polynomial' getReferences(object)
getReferences(object) ## S4 method for signature 'Pn_lognormalDensity' getReferences(object) ## S4 method for signature 'Pn_logtDensity' getReferences(object) ## S4 method for signature 'Rn_Gauss' getReferences(object) ## S4 method for signature 'Rn_floorNorm' getReferences(object) ## S4 method for signature 'Rn_normalDensity' getReferences(object) ## S4 method for signature 'Rn_tDensity' getReferences(object) ## S4 method for signature 'standardSimplex_Dirichlet' getReferences(object) ## S4 method for signature 'standardSimplex_exp_sum' getReferences(object) ## S4 method for signature 'unitBall_normGauss' getReferences(object) ## S4 method for signature 'unitBall_polynomial' getReferences(object) ## S4 method for signature 'unitCube_BFN1' getReferences(object) ## S4 method for signature 'unitCube_BFN2' getReferences(object) ## S4 method for signature 'unitCube_BFN3' getReferences(object) ## S4 method for signature 'unitCube_BFN4' getReferences(object) ## S4 method for signature 'unitCube_Genz1' getReferences(object) ## S4 method for signature 'unitCube_cos2' getReferences(object) ## S4 method for signature 'unitCube_floor' getReferences(object) ## S4 method for signature 'unitCube_max' getReferences(object) ## S4 method for signature 'unitSphere_innerProduct1' getReferences(object) ## S4 method for signature 'unitSphere_polynomial' getReferences(object)
object |
Test function for which the references are returned |
Vector with references for the specific function
Klaus Herrmann
getTags is a generic function that returns a vector of tags associated to the test function instance.
getTags(object) ## S4 method for signature 'Pn_lognormalDensity' getTags(object) ## S4 method for signature 'Pn_logtDensity' getTags(object) ## S4 method for signature 'Rn_Gauss' getTags(object) ## S4 method for signature 'Rn_floorNorm' getTags(object) ## S4 method for signature 'Rn_normalDensity' getTags(object) ## S4 method for signature 'Rn_tDensity' getTags(object) ## S4 method for signature 'standardSimplex_Dirichlet' getTags(object) ## S4 method for signature 'standardSimplex_exp_sum' getTags(object) ## S4 method for signature 'unitBall_normGauss' getTags(object) ## S4 method for signature 'unitBall_polynomial' getTags(object) ## S4 method for signature 'unitCube_BFN1' getTags(object) ## S4 method for signature 'unitCube_BFN2' getTags(object) ## S4 method for signature 'unitCube_BFN3' getTags(object) ## S4 method for signature 'unitCube_BFN4' getTags(object) ## S4 method for signature 'unitCube_Genz1' getTags(object) ## S4 method for signature 'unitCube_cos2' getTags(object) ## S4 method for signature 'unitCube_floor' getTags(object) ## S4 method for signature 'unitCube_max' getTags(object) ## S4 method for signature 'unitSphere_innerProduct1' getTags(object) ## S4 method for signature 'unitSphere_polynomial' getTags(object)
getTags(object) ## S4 method for signature 'Pn_lognormalDensity' getTags(object) ## S4 method for signature 'Pn_logtDensity' getTags(object) ## S4 method for signature 'Rn_Gauss' getTags(object) ## S4 method for signature 'Rn_floorNorm' getTags(object) ## S4 method for signature 'Rn_normalDensity' getTags(object) ## S4 method for signature 'Rn_tDensity' getTags(object) ## S4 method for signature 'standardSimplex_Dirichlet' getTags(object) ## S4 method for signature 'standardSimplex_exp_sum' getTags(object) ## S4 method for signature 'unitBall_normGauss' getTags(object) ## S4 method for signature 'unitBall_polynomial' getTags(object) ## S4 method for signature 'unitCube_BFN1' getTags(object) ## S4 method for signature 'unitCube_BFN2' getTags(object) ## S4 method for signature 'unitCube_BFN3' getTags(object) ## S4 method for signature 'unitCube_BFN4' getTags(object) ## S4 method for signature 'unitCube_Genz1' getTags(object) ## S4 method for signature 'unitCube_cos2' getTags(object) ## S4 method for signature 'unitCube_floor' getTags(object) ## S4 method for signature 'unitCube_max' getTags(object) ## S4 method for signature 'unitSphere_innerProduct1' getTags(object) ## S4 method for signature 'unitSphere_polynomial' getTags(object)
object |
Test function for which the tags are returned |
Vector with tags related to the function
Klaus Herrmann
The multIntTestFunc package provides multivariate test functions to test numerical integration routines. The functions are available in all dimensions n>=1 and the exact value of the integral is known.
The multIntTestFunc functions are S4 classes that are instantiated with the dimension and additional parameters if necessary. They implement methods to evaluate the function for given evaluation points (arranged in a matrix) and to evaluate the exact value of the integral of the function over the respective integration domain.
The function allows to build a multivariate quadrature rule from univariate ones. The multivariate node points are all possible combinations of the univariate node points, and the final weights are the product of the respective univariate weights.
pIntRule(x, dim = NULL)
pIntRule(x, dim = NULL)
x |
Either a list with two elements $nodes and $weights representing a one dimensional quadrature formula which are then used for all dimensions, or a list where each element is a itself a list with two elements $nodes and $weights. In this case the respective quadrature rule is used for each dimension. |
dim |
An integer that defines the dimension of the output quadrature formula. Default is NULL. If dim is NULL then x has to be a list of quadrature rules (list of lists) and the dimensions is automatically generated. If dim is a positive integer value the same quadrature rule is used in all dimensions. |
A list with a matrix of multivariate node points (each row is one point) and a vector of corresponding weights
Klaus Herrmann
require(statmod) herm <- gauss.quad(2,"hermite") lag <- gauss.quad(3,"laguerre") qRule1 <- pIntRule(herm,2) qRule2 <- pIntRule(list(herm,lag))
require(statmod) herm <- gauss.quad(2,"hermite") lag <- gauss.quad(3,"laguerre") qRule1 <- pIntRule(herm,2) qRule2 <- pIntRule(list(herm,lag))
on
Implementation of the function
where is the dimension of the integration domain
.
In this case the integral is know to be
The instance needs to be created with three parameters representing the dimension , the location vector
and the variance-covariance matrix
which needs to be symmetric positive definite.
dim
An integer that captures the dimension
mean
A vector of size dim with real entries.
sigma
A matrix of size dim x dim that is symmetric positive definite.
Klaus Herrmann
n <- as.integer(3) f <- new("Pn_lognormalDensity",dim=n,mean=rep(0,n),sigma=diag(n))
n <- as.integer(3) f <- new("Pn_lognormalDensity",dim=n,mean=rep(0,n),sigma=diag(n))
on
Implementation of the function
where is the dimension of the integration domain
.
In this case the integral is know to be
The instance needs to be created with four parameters representing the dimension , the location vector
, the variance-covariance matrix
which needs to be symmetric positive definite and the degrees of freedom parameter
.
dim
An integer that captures the dimension
delta
A vector of size dim with real entries.
sigma
A matrix of size dim x dim that is symmetric positive definite.
df
A positive numerical value representing the degrees of freedom.
Klaus Herrmann
n <- as.integer(3) f <- new("Pn_logtDensity",dim=n,delta=rep(0,n),sigma=diag(n),df=3)
n <- as.integer(3) f <- new("Pn_logtDensity",dim=n,delta=rep(0,n),sigma=diag(n),df=3)
on
Implementation of the function
where is the dimension of the integration domain
and
is a parameter.
In this case the integral is know to be
where is the Riemann zeta function.
The instance needs to be created with two parameters representing and
.
dim
An integer that captures the dimension
s
A numeric value bigger than 1 representing a power
Klaus Herrmann
n <- as.integer(3) f <- new("Rn_floorNorm",dim=n,s=2)
n <- as.integer(3) f <- new("Rn_floorNorm",dim=n,s=2)
on
Implementation of the function
where is the dimension of the integration domain
.
In this case the integral is know to be
The instance needs to be created with one parameter representing .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("Rn_Gauss",dim=n)
n <- as.integer(3) f <- new("Rn_Gauss",dim=n)
on
Implementation of the function
where is the dimension of the integration domain
.
In this case the integral is know to be
The instance needs to be created with three parameters representing the dimension , the location vector
and the variance-covariance matrix
which needs to be symmetric positive definite.
dim
An integer that captures the dimension
mean
A vector of size dim with real entries.
sigma
A matrix of size dim x dim that is symmetric positive definite.
Klaus Herrmann
n <- as.integer(3) f <- new("Rn_normalDensity",dim=n,mean=rep(0,n),sigma=diag(n))
n <- as.integer(3) f <- new("Rn_normalDensity",dim=n,mean=rep(0,n),sigma=diag(n))
on
Implementation of the function
where is the dimension of the integration domain
.
In this case the integral is know to be
The instance needs to be created with four parameters representing the dimension , the location vector
, the variance-covariance matrix
which needs to be symmetric positive definite and the degrees of freedom parameter
.
dim
An integer that captures the dimension
delta
A vector of size dim with real entries.
sigma
A matrix of size dim x dim that is symmetric positive definite.
df
A positive numerical value representing the degrees of freedom.
Klaus Herrmann
n <- as.integer(3) f <- new("Rn_tDensity",dim=n,delta=rep(0,n),sigma=diag(n),df=3)
n <- as.integer(3) f <- new("Rn_tDensity",dim=n,delta=rep(0,n),sigma=diag(n),df=3)
on
Implementation of the function
where is the dimension of the integration domain
and
,
, are constants.
The integral is known to be
where for
.
The instance needs to be created with two parameters representing the dimension and the vector of positive parameters.
dim
An integer that captures the dimension
v
A vector of dimension with positive entries representing the constants
Klaus Herrmann
n <- as.integer(3) f <- new("standardSimplex_Dirichlet",dim=n,v=c(1,2,3,4))
n <- as.integer(3) f <- new("standardSimplex_Dirichlet",dim=n,v=c(1,2,3,4))
on
Implementation of the function
where is the dimension of the integration domain
and
is a constant.
The integral is known to be
where is the incomplete gamma function.
The instance needs to be created with two parameters representing the dimension and the parameter
.
dim
An integer that captures the dimension
coeff
A strictly positive number representing the constant
Klaus Herrmann
n <- as.integer(3) f <- new("standardSimplex_exp_sum",dim=n,coeff=1)
n <- as.integer(3) f <- new("standardSimplex_exp_sum",dim=n,coeff=1)
on
Implementation of the function
where is the dimension of the integration domain
.
In this case the integral is know to be
where follows a chisquare distribution with
degrees of freedom.
The instance needs to be created with one parameter representing .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("unitBall_normGauss",dim=n)
n <- as.integer(3) f <- new("unitBall_normGauss",dim=n)
on
Implementation of the function
where is the dimension of the integration domain
and
,
, are parameters.
If at least one of the coefficients
is odd, i.e.,
for at leas one
, the integral is zero, otherwise the integral is known to be
where .
The instance needs to be created with two parameters representing the dimension and a
-dimensional vector of integers (including
) representing the exponents.
dim
An integer that captures the dimension
expo
An vector that captures the exponents
Klaus Herrmann
n <- as.integer(3) f <- new("unitBall_polynomial",dim=n,expo=c(1,2,3))
n <- as.integer(3) f <- new("unitBall_polynomial",dim=n,expo=c(1,2,3))
on
Implementation of the function
,
where is the dimension of the integration domain
.
The integral is known to be
The instance needs to be created with one parameter representing the dimension .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("unitCube_BFN1",dim=n)
n <- as.integer(3) f <- new("unitCube_BFN1",dim=n)
on
Implementation of the function
,
where is the dimension of the integration domain
.
The integral is known to be
The instance needs to be created with one parameter representing the dimension .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("unitCube_BFN2",dim=n)
n <- as.integer(3) f <- new("unitCube_BFN2",dim=n)
on
Implementation of the function
,
where is the dimension of the integration domain
and
is the Chebyshev polynomial of degree
and
.
The integral is known to be
The instance needs to be created with one parameter representing the dimension .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("unitCube_BFN3",dim=n)
n <- as.integer(3) f <- new("unitCube_BFN3",dim=n)
on
Implementation of the function
,
where is the dimension of the integration domain
.
The integral is known to be
The instance needs to be created with one parameter representing the dimension .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("unitCube_BFN4",dim=n)
n <- as.integer(3) f <- new("unitCube_BFN4",dim=n)
on
Implementation of the function
where is the dimension of the integration domain
and
is a
-dimensional parameter vector where each entry is different from
.
The integral is known to be
The instance needs to be created with two parameters representing the dimension and the
-dimensional parameter vector where each entry is different from
.
dim
An integer that captures the dimension
coeffs
A vector of non-zero parameters
Klaus Herrmann
n <- as.integer(3) f <- new("unitCube_cos2",dim=n, coeffs=c(-1,2,-2))
n <- as.integer(3) f <- new("unitCube_cos2",dim=n, coeffs=c(-1,2,-2))
on
Implementation of the function
where is the dimension of the integration domain
.
The integral is known to be
The instance needs to be created with one parameter representing the dimension .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("unitCube_floor",dim=n)
n <- as.integer(3) f <- new("unitCube_floor",dim=n)
on
Implementation of the function
,
where is the dimension of the integration domain
.
The integral is known to be
The instance needs to be created with three parameter representing the dimension , the real number
and the vector
.
dim
An integer that captures the dimension
u
A real number representing a shift in the integrand
a
A vector of real numbers, each non-zero, increasing the difficulty of the integrand with higher absolute values
Klaus Herrmann
n <- as.integer(3) u <- pi a <- rep(exp(1),n) f <- new("unitCube_Genz1",dim=n, u=u, a=a)
n <- as.integer(3) u <- pi a <- rep(exp(1),n) f <- new("unitCube_Genz1",dim=n, u=u, a=a)
on
Implementation of the function
,
where is the dimension of the integration domain
.
The integral is known to be
The instance needs to be created with one parameter representing the dimension .
dim
An integer that captures the dimension
Klaus Herrmann
n <- as.integer(3) f <- new("unitCube_max",dim=n)
n <- as.integer(3) f <- new("unitCube_max",dim=n)
on
Implementation of the function
where is the dimension of the integration domain
and
and
are two
-dimensional parameter vectors.
The integral is known to be
where and
.
Due to the difficulty of testing 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
and allows to test
.
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 and the two
-dimensional (real) vectors
and
.
dim
An integer that captures the dimension
a
A -dimensional real vector
b
A -dimensional real vector
Klaus Herrmann
n <- as.integer(3) f <- new("unitSphere_innerProduct1",dim=n,a=c(1,2,3),b=c(-1,-2,-3))
n <- as.integer(3) f <- new("unitSphere_innerProduct1",dim=n,a=c(1,2,3),b=c(-1,-2,-3))
on
Implementation of the function
where is the dimension of the integration domain
and
,
, are parameters.
If at least one of the coefficients
is odd, i.e.,
for at leas one
, the integral is zero, otherwise the integral is known to be
where .
Due to the difficulty of testing 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
and allows to test
.
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 and a
-dimensional vector of integers (including
) representing the exponents.
dim
An integer that captures the dimension
expo
An vector that captures the exponents
Klaus Herrmann
n <- as.integer(3) f <- new("unitSphere_polynomial",dim=n,expo=c(1,2,3))
n <- as.integer(3) f <- new("unitSphere_polynomial",dim=n,expo=c(1,2,3))