Registered Member
|
I am using RcppEigen on R. I would like to take a double vector from R layer:
RcppExport SEXP testfunc (SEXP a) { const Eigen::Map<Eigen::VectorXd> vecD(as<Eigen::Map<Eigen::VectorXd> >(a)); But, number is comming as integer, so I need to get it as integer like this : RcppExport SEXP testfunc (SEXP a) { const Eigen::Map<Eigen::VectorXi> vecD(as<Eigen::Map<Eigen::VectorXi> >(a)); So, I need to convert it to the double. Can I convert Eigen::VectorXi to Eigen::VectorXd ? |
Moderator
|
answered there: http://stackoverflow.com/questions/1345 ... envectorxd
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]