[Rcpp-devel] using Rinside/Rcpp and Eigen

Cattus Cerebrum cattuscerebrum at gmail.com
Thu Apr 12 14:31:40 CEST 2012


I have a c++ project that stores data in Eigen matrices.
I would like to use R functionality from the c++ code,
but I am not sure how to convert my data to Rcpp data types
(e.g. NumericVector).  Should I create a NumericVector
and copy my data into it, or is there any way to avoid the
copy by using the common storage?  Eigen matrix has a method
data() that returns the underlying double pointer, and
methods that give outer and inner strides of the matrix.
Thanks.


More information about the Rcpp-devel mailing list