R wrappers around the cubature C library of Steven G. Johnson for adaptive multivariate integration over hypercubes and the Cuba C library of Thomas Hahn for deterministic and Monte Carlo integration. Scalar and vector interfaces for cubature and Cuba routines are provided; the vector interfaces are highly recommended as demonstrated in the package vignette.
Cubature is an R package for adaptive multivariate integration over hypercubes. The core of the package is the cubature C library of Steven G. Johnson.
The package provides both
pcubature routines in
addition to a vector interface.
R users will gain a lot by using the vector interace. Writing functions to take advantage of the vector interface is quite easy. Refer to the vignette that provides timing comparisons and vectorization examples to emulate.
scaleargument to tests to conform to pass checks.
R2Cubaand updated vignette with information on imminent 2.0 release.
Fixed up the C call so that it is re-entrant (brought to my attention by Pierre de Villemereuil). This should be considered a bug fix!
Corrected private notes
inst/includefor linking to other packages
clencurt.h) using M = 16 and put back C cubature source in tree.
hcubaturefunction gains a norm argument that is set to a sensible default so as not to affect depending packages
adapt_integrate_vso that they are directly callable from C (courtesy of Simen Gaure)
adaptIntegrate; default value for
doCheckingwas incorrectly stated as
FALSE) to save some computation time in evaluating integrand (9% speedup).
adaptIntegrategains ... argument (request of Baptiste Auguie)
testFn2to match cubature output exactly