epiverse-trace / epidemics

A library of published compartmental epidemic models, and classes to represent demographic structure, non-pharmaceutical interventions, and vaccination regimes, to compose epidemic scenarios.
https://epiverse-trace.github.io/epidemics/
Other
8 stars 2 forks source link

Second attempt at C++ implementation of Ebola model #179

Closed pratikunterwegs closed 2 months ago

pratikunterwegs commented 6 months ago

This issue requests a second attempt at an implementation of the ebola model. The previous Rcpp implementation was removed in #140, as it did not offer a substantial speed gain.

Possible reasons for no speed gain, and possible targets for improvement:

Note: make sure to use Rcpp-provided random number draws, or to include a wrapper to the R random number generator to take advantage of seed management through R.

pratikunterwegs commented 4 months ago

This issue is a candidate for closing: the implementation of stats::rmultinom() is a very efficient way of drawing from a weighted categorical distribution, written in C; it cannot easily be improved by re-writing in Rcpp. This has been added to the design principles vignette.