[Rcpp-devel] added raw support in RcppSexp
edd at debian.org
Tue Dec 22 13:39:49 CET 2009
On 22 December 2009 at 12:15, Romain François wrote:
| > I've long wondered why/how/if we could assign more efficiently -- but STL
| > Vectors don't let us just 'memcpy' a chunk.
| I don't think you are guaranteed that the elements are contiguous, so I
| would not go down there.
Right. I R they are, in STL not necessarily.
| > Would this 'more iterator like' assign(a,b) work for the types INTEGER, REAL
| > too?
| yep. I derived this from reading item 5 of Effective STL, and how the
| author is rambling about using range functions rather than looping around.
| a and be can be int* which is what INTEGER(x) would give you.
Maybe I'll peek and poke. Though I had hope to put work on Rcpp to rest for
it to get to other stuff :)
Saw that CPP is on R-Forge. Makes sense for now; we'll get to revisit CPP and
Rcpp and all that with RProtoBuf a few times over anyway...
Three out of two people have difficulties with fractions.
More information about the Rcpp-devel