[Rcpp-devel] Integrals with Rcpp

Baptiste Auguie baptiste.auguie at gmail.com
Tue Jan 13 19:14:31 CET 2015


Hi,

I might be the author of the SO question you refer to. In the planar
package I've tried a number of different strategies for numerical
integration, but the most efficient I managed was at the C++ level, with
direct call to the cubature library,
https://github.com/baptiste/planar/blob/master/src/gaussian_beam.cpp#L478

At the time, I wrote for myself a minimal example,
https://github.com/baptiste/cubature/blob/master/minimal.c

HTH,

baptiste

On 9 January 2015 at 11:10, Federico Andreis <federico.andreis at gmail.com>
wrote:

> Dear all,
>
> I was wondering what, in your opinion, would be the best way to handle the
> computation of definite integrals using Rcpp.
>
> To be more precise, I need to evaluate a double integral that turns out to
> be somewhat nasty (really slow computation and presumably inaccurate
> results using the R cubature package).
>
> Should I write the integration algorithm from scratch, or is there any
> external library you would suggest?
>
> I've already found the post on Stackoverflow 'using C function from other
> package in Rcpp' that dealt with an integration problem as well, but it
> looked too general for my problem and also, it's one year old, maybe
> something else has turned up in the meanwhile..
>
> Thanks in advance, and congrats for the great work with Rcpp!
>
> /federico
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150113/2e39b136/attachment-0001.html>


More information about the Rcpp-devel mailing list