[Rcpp-devel] Using complex numbers and functions in Rcpp

Dirk Eddelbuettel edd at debian.org
Tue Feb 21 23:13:07 CET 2017


On 22 February 2017 at 10:36, Baptiste Auguie wrote:
| I think you can/should use std::complex, see for example the types used in
| 
| https://github.com/baptiste/rcppfaddeeva/blob/master/src/callFaddeeva.cpp 
| 
| In general I prefer to work with RcppArmadillo for numerical (including
| complex) computations, its syntax closely follows R and Matlab. See for
| instance 
| 
| https://github.com/baptiste/cda/blob/master/src/cda.cpp
| https://github.com/baptiste/planar/blob/master/src/fresnel.cpp
| 
| for some examples.

Perfect. I was just about to recommend to Martin that he look closely at
your packages :)

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list