On 4 April 2013 at 12:45, Krzysztof Sakrejda wrote:
| I realize you did not ask for book suggestions, but a gentle walk
| through all these C++ issues (Slicing, constructors/destructors, and
| the joy of pointers) is contained in Koenig & Moo's "Accelerated C++:
| practical programming by example.
Hello Everybody,
I am trying to create tree data structure using C++ and Rcpp and use it
from R.
I want to incrementally build the tree by merging a tree with other tress.
So, I created a class for the tree and a class for the nodes in the tree.
The tree class has two constructors, the first one s
On Thu, Apr 4, 2013 at 12:10 PM, Robin Girard
wrote:
> but when I do
>
> res=new("Rcpp_vector_Of_father",1:10)
> res[[1]]$WhoAmI()
> res[[0]]$WhoAmI()
>
> rm(res)
> gc()
>
> that crashes with gc()
Dear Robin,
I realize you did not ask for book suggestions, but a gentle walk
through all these C++
Le 04/04/13 18:10, Robin Girard a écrit :
but when I do
res=new("Rcpp_vector_Of_father",1:10)
res[[1]]$WhoAmI()
res[[0]]$WhoAmI()
rm(res)
gc()
that crashes with gc()
R.
Yes. That is the sort of things you need to worry about.
when you do res[[1]], you call this
father* vec_get( int i) { re
but when I do
res=new("Rcpp_vector_Of_father",1:10)
res[[1]]$WhoAmI()
res[[0]]$WhoAmI()
rm(res)
gc()
that crashes with gc()
R.
- Mail original -
De: "Robin Girard"
À: "Romain Francois"
Cc: [email protected]
Envoyé: Jeudi 4 Avril 2013 18:08:50
Objet: Re: [Rcpp-d
that works indeed :)
R.
- Mail original -
De: "Romain Francois"
À: "Robin Girard"
Cc: [email protected]
Envoyé: Jeudi 4 Avril 2013 17:58:42
Objet: Re: [Rcpp-devel] Module with vector of a class with inheritance, how to
avoid slicing
Le 04/04/13 17:34, Robin Gi
Le 04/04/13 17:34, Robin Girard a écrit :
Thanks a lot Romain ! you're amazingly fast and furious (got my seatbelt). I'll
definitely buy the book.
That works on my example, I confirm (I had a side problem with using _t which I removed
but don't see where this comes from, my side for sure). No
Thanks a lot Romain ! you're amazingly fast and furious (got my seatbelt). I'll
definitely buy the book.
That works on my example, I confirm (I had a side problem with using _t which I
removed but don't see where this comes from, my side for sure). Now I'm trying
to implement it on my "real w