role-model / roleR

R package implementing the RoLE model
https://role-model.github.io/roleR
GNU General Public License v3.0
1 stars 2 forks source link

there are two ways deep copies are being made, is that necessary, or should we pick one and stick with it? #128

Open ajrominger opened 1 year ago

ajrominger commented 1 year ago

the two approaches:

  1. the rcpp constructor for roleDataCpp includes a copy constructor and a copy assignment operator
  2. iterModelCpp calls Rcpp::clone to clone object values at each niterTimestep (i.e. when a snapshot is saved)

So do we need both? I tried commenting out the copy constructor and copy assignment operator and nothing bad seems to have happened!

thoughts @jidec ?