Hi, The backend of cubature package is the cubature C library from MIT. The same author with nlopt.
Can you give a little more detail about the double integral? Cubature should not be that slow from my experience. Best, KK On Fri, Jan 9, 2015 at 9:38 AM, Dirk Eddelbuettel <e...@debian.org> wrote: > > On 9 January 2015 at 15:10, Federico Andreis 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.. > > From the top of my head, I think there are several CRAN package doing > something like cubature with related names. It is not something I use day > to day so maybe somebody else will chime in... > > In general, though, one (easy ?) approach is to solve the problem with > standalone C/C++ code [ possibly entirely outside of of R ] and then learn > (here and elsewhere) how to connect that to R via Rcpp. It is > straightforward. > > Alternatively, and starting from the other end, learn how to access C / C++ > code in another package and do it with C++ code from R via Rcpp. > > Or use the middle ground. There are lots of ways in which Rcpp can help > you here. > > Dirk > > | Thanks in advance, and congrats for the great work with Rcpp! > | > | /federico > | _______________________________________________ > | Rcpp-devel mailing list > | Rcpp-devel@lists.r-forge.r-project.org > | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > _______________________________________________ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > -- Qiang Kou q...@umail.iu.edu School of Informatics and Computing, Indiana University
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel