<div dir="ltr">In my opinion, RcppGSL may be a good choice.<div><br></div><div>If you are using Weibull distribution, there is a <b>gsl_ran_weibull_pdf()</b> in GSL [1].</div><div><br></div><div>Best,</div><div><br></div><div>
KK</div><div><br></div><div>[1] <a href="https://www.gnu.org/software/gsl/manual/html_node/The-Weibull-Distribution.html#The-Weibull-Distribution">https://www.gnu.org/software/gsl/manual/html_node/The-Weibull-Distribution.html#The-Weibull-Distribution</a></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 3:15 PM, Silkworth,David J. <span dir="ltr"><<a href="mailto:SILKWODJ@airproducts.com" target="_blank">SILKWODJ@airproducts.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div>
<font face="Calibri"><span style="font-size:11pt">
<div>I have a current project desire to move something like R’s integrate function inside a loop in Rcpp code.  The performance hit to call back to R seems to kill the advantage of Rcpp in the first place.  Actually my integrand is t*pdf(t), very similar indeed
to pweibull which integrates pdf(t).  It has been hard to find previous discussion on this topic since the title of articles and book include the word Integration in  another context.</div>
<div> </div>
<div>I realize that eventually R’s integrate function calls rdqags (over a definite interval), but there is a lot of memory management that is taken care of before the call.  This is over my head.</div>
<div> </div>
<div>I could try to incorporate the GSL, but this too seems daunting (even with RcppGSL).  I think there may be integration support in the boost headers, but my head is too small for this yet.</div>
<div> </div>
<div>Any ideas that could help me?</div>
<div> </div>
<div>Dave Silkworth</div>
<div> </div>
</span></font>
</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><br clear="all"><div>
<br></div>-- <br><div dir="ltr">Qiang Kou<div><a href="mailto:qkou@umail.iu.edu" target="_blank">qkou@umail.iu.edu</a><br><div>School of Informatics and Computing, Indiana University</div><div><br></div></div></div>
</div>