On 5 March 2021 at 18:44, Iñaki Ucar wrote:
| Excellent. Note that the clone method was required for my use case, but it
| may be superfluous for yours.
It's very nice to do it straight up with the XPtr class.
A variant using Rcpp Modules is offerend byy RcppAnnoy -- also templated.
Dirk
--
h
Excellent. Note that the clone method was required for my use case, but it
may be superfluous for yours.
Iñaki
El vie., 5 mar. 2021 17:15, Subhomoy Ghosh escribió:
> Thanks, Iñaki! Your package gave me enough hints to create the following
> attempt which seemed to have worked.
>
> #include
>
>
Thanks, Iñaki! Your package gave me enough hints to create the following
attempt which seemed to have worked.
#include
using namespace Rcpp;
using namespace arma;
// [[Rcpp::depends(RcppArmadillo)]]
class Distribution {
public:
virtual Distribution* clone() {return (new Distribution(*this))