[erlang-questions] Implemented Poisson and Exponential Distribution
John-Paul Bader
hukl@REDACTED
Sun May 31 16:48:29 CEST 2015
Hey guys,
I've spent the last couple of days with re-implementing the algorithms
for taking random samples from the poisson and exponential distribution
from R's native C implementation.
It was quite the challenge to translate the imperative C code to Erlangs
functional style, especially the one goto statement.
The Erlang code might still be subject for optimization and I would
appreciate any feedback on how to improve it.
The C code is included in the Repo for reference and it is implementing
after two papers which presented highly efficient algorithms for both
problems.
The code can be found here:
https://github.com/hukl/rstats
Kind regards,
~ John
More information about the erlang-questions
mailing list