Is it possible to use Alglib with Rcpp?

只愿长相守 提交于 2019-12-11 02:01:12

问题


I often use Rcpp code to incorporate C++ code into R. Through the BH-package I am also able to use the Boost-library. However, the Boost library lacks a function that I would like to use (to be precise, it only has Bessel function but I would like to get Log-Bessel immediately because of overflow). I know that Alglib does have this feature.

Would it be possible to use Alglib with Rcpp, that is, use the log-bessel function from Alglib somehow?


回答1:


I do not see a clear difference in functionality between the

  • AlgLib documentation on Bessel functions, and
  • Boost documentation on Bessel functions.

As such, I think you can just use the BH package giving you all of Boost Math and then some.

Last but not least there is a package bessel on CRAN written by the R Core member focusing on special functions so you could start from there too.



来源:https://stackoverflow.com/questions/27775923/is-it-possible-to-use-alglib-with-rcpp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!