Open RobinHankin opened 1 year ago
It should be straightforward to implement the complex case. In response to a stackoverflow questin, Dirk gives this:
R> cppFunction("ComplexVector doubleMe(ComplexVector x) { return x+x; }") R> doubleMe(1+1i) [1] 2+2i R> doubleMe(c(1+1i, 2+2i)) [1] 2+2i 4+4i R>
It should be straightforward to implement the complex case. In response to a stackoverflow questin, Dirk gives this: