[Rcpp-devel] row iterators in RcppArmadillo

2016-10-12 Thread Jonathan Fintzi
Hello, I am trying to use the std::copy() function to copy elements from an Rcpp::NumericVector into rows of armadillo matrices. A simplified version of my code is as follows: cppFunction('void copyinto(Rcpp::NumericVector& v, arma::mat& d1, arma::mat& d2) { std::copy(v.begin(), v.begin()

Re: [Rcpp-devel] row iterators in RcppArmadillo

2016-10-12 Thread Jonathan Fintzi
ers don't work which armadillo column pointers are fine. Thanks, Jon On Wed, Oct 12, 2016 at 2:10 PM, Dirk Eddelbuettel wrote: > > On 12 October 2016 at 13:43, Jonathan Fintzi wrote: > | Hello, > | > | I am trying to use the std::copy() function to copy elements from an > |

Re: [Rcpp-devel] row iterators in RcppArmadillo

2016-10-12 Thread Jonathan Fintzi
Hi Dirk, I take your point. Given that the conversion is essentially free, temporary conversion makes the most sense. Thank you again! Jon On Wed, Oct 12, 2016 at 2:36 PM, Dirk Eddelbuettel wrote: > > Hi Jon, > > On 12 October 2016 at 14:20, Jonathan Fintzi wrote: > | Thank

Re: [Rcpp-devel] row iterators in RcppArmadillo

2016-10-12 Thread Jonathan Fintzi
; Hi Jonathan, > > Jonathan Fintzi has written at Wed, 12 Oct 2016 13:43:20 -0700 > > Hello, > > I am trying to use the std::copy() function to copy elements from an > Rcpp::NumericVector into rows of armadillo matrices. A simplified version > of my code is as follows