The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Integration Test for Rn

Introduction

We will use a product rule based on Gauss-Hermite quadrature to integrate test functions over the multivariate real numbers \(R^n = (-\infty,\infty)^n\). Due to the exponential increase of node points in the number of dimensions, product rules are not recommended for high dimensional integration. They are however easy to compute benchmarks and we will use them for this reason. We start by creating the product rule nodes and weights.

require(multIntTestFunc)
## Loading required package: multIntTestFunc
require(statmod)
## Loading required package: statmod
n <- as.integer(2)

hermite <- gauss.quad(10,"hermite")
multHermite <- pIntRule(hermite,n)
nodes <- multHermite$nodes
weights <- multHermite$weights

f <- new("Rn_Gauss",dim=n)

eval <- evaluate(f,nodes)
approx <- sum(weights*eval)
print(approx)
## [1] 1.570726
#print exact integral
print(exactIntegral(f))
## [1] 3.141593

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.