mrc-ide / drjacoby

Flexible Markov chain monte carlo via reparameterization
https://mrc-ide.github.io/drjacoby/
Other
12 stars 5 forks source link

source cpp files method #79

Closed pwinskill closed 2 years ago

pwinskill commented 2 years ago

Finishing up work porting custom functions to bring in cpp over to only using Rcpp::sourceCpp(). This has advantages in that it is the standard and most common way of bring in cpp function into R and also allows the user to create functions that call functions when defining the loglikelihood and logprior.

One complicating factor is that the cpp file must include a linking function to create the pointer used in the MCMC. To aid new users a cpp file template (see cpp_template()) is now included.

BREAKING: previous scripts using the 'cpp_function_get() approach will no longer work.

Vignettes and inference checks have also been updated