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

2017-02-21 Thread Dirk Eddelbuettel
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)

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

2017-02-21 Thread Baptiste Auguie
Hi, 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

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

2017-02-21 Thread Martin S Ridout
Apologies if this is a naive question - I'm a beginner with Rcpp. I did see some earlier discussion on similar topic, but I don't think it answered my questions. I am trying (on Windows) to speed up a function currently written in R. This works very well for real-valued arguments of the funct