<div dir="ltr">Hi,<div><br></div><div>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,</div><div><a href="https://github.com/baptiste/planar/blob/master/src/gaussian_beam.cpp#L478">https://github.com/baptiste/planar/blob/master/src/gaussian_beam.cpp#L478</a></div><div><br></div><div>At the time, I wrote for myself a minimal example, <a href="https://github.com/baptiste/cubature/blob/master/minimal.c">https://github.com/baptiste/cubature/blob/master/minimal.c</a></div><div><br></div><div>HTH,</div><div><br></div><div>baptiste</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 January 2015 at 11:10, Federico Andreis <span dir="ltr"><<a href="mailto:federico.andreis@gmail.com" target="_blank">federico.andreis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Dear all,<br><br></div>I was wondering what, in your opinion, would be the best way to handle the computation of definite integrals using Rcpp.<br><br>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).<br><br></div>Should I write the integration algorithm from scratch, or is there any external library you would suggest?<br><br>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..<br></div><br></div>Thanks in advance, and congrats for the great work with Rcpp!<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">/federico<br></font></span></div>
<br>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br></blockquote></div><br></div>