R2Cuba-package {R2Cuba}R Documentation

Multidimensional Numerical Integration

Description

R2Cuba implements four general-purpose multidimensional integration algorithms: Vegas, Suave, Divonne and Cuhre. It is a wrapper around the Cuba-1.6 library by Thomas Hahn available from the URL http://www.feynarts.de/cuba/.

Details

Package: R2Cuba
Version: 1.0-0
Date: 2010-01-01
Depends: methods, stats
License: GPL (>= 3)

Author(s)

The Cuba library has been written by Thomas Hahn (http://wwwth.mppmu.mpg.de/members/hahn). Interface to R was written by Annie Bouvier and Kiên Kiêu (MIA Lab, INRA, Jouy-en-Josas, France http://www.jouy.inra.fr/mia_eng/).

Maintainer: Annie Bouvier <Annie.Bouvier@jouy.inra.fr>

References

The Cuba library is described at http://www.feynarts.de/cuba/. User documentation is available in T. Hahn (2005) CUBA-a library for multidimensional numerical integration. Computer Physics Communications, 168, 78-95. (http://arxiv.org/pdf/hep-ph/0404043).

See Also

The R-package “cubature”

Examples

integrand <- function(arg, weight) {
  x <- arg[1]
  y <- arg[2]
  z <- arg[3]
  ff <- sin(x)*cos(y)*exp(z);
return(ff)
} # end integrand
NDIM <-3
NCOMP <- 1
vegas(NDIM, NCOMP, integrand, rel.tol=1e-3,  abs.tol=1e-12)

[Package R2Cuba version 1.0-3 Index]