https://github.com/eddelbuettel/rcppziggurat
Rcpp bindings for different Ziggurat RNG implementations
https://github.com/eddelbuettel/rcppziggurat
cran r-package random-number-generators rcpp ziggurat
Last synced: 10 months ago
JSON representation
Rcpp bindings for different Ziggurat RNG implementations
- Host: GitHub
- URL: https://github.com/eddelbuettel/rcppziggurat
- Owner: eddelbuettel
- License: other
- Created: 2013-10-06T15:29:58.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2025-01-04T15:10:52.000Z (about 1 year ago)
- Last Synced: 2025-03-18T01:11:17.336Z (10 months ago)
- Topics: cran, r-package, random-number-generators, rcpp, ziggurat
- Language: C++
- Size: 1.28 MB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
## RcppZiggurat: Rcpp Bindings for Ziggurat RNGs
[](https://github.com/eddelbuettel/rcppziggurat/actions?query=workflow%3Aci)
[](https://www.gnu.org/licenses/gpl-2.0.html)
[](https://cran.r-project.org/package=RcppZiggurat)
[](https://www.r-pkg.org:443/pkg/RcppZiggurat)
[](https://github.com/eddelbuettel/rcppziggurat)
### Overview
The RcppZiggurat package regroups a number of implementations of the
'Ziggurat' random number generator by Marsaglia and Tsang (JSS, 2000), both
in the original version and via the update by Leong, Zhang, Lee, Luk and
Villasenor (JSS, 2005).
The purpose of the package is to both study and time these implementations in
order to provide a fast N(0,1) generator for use by R. The generators
included in R are excellent and very diligently implemented, but not
generally the fastest. This package aims to close the performance gap.
You should know what you are doing when deploying this package. If in doubt,
stick with the default generators.
### Vignette
The package contains a [detailed vignette](http://dirk.eddelbuettel.com/papers/RcppZiggurat.pdf) summarizing the methods, the
implementation as well as the statistical properties (examined via three
different tests) and the generator speed.
### Status
The package currently contains six different implementations. Two are
standard from the literature: the original Marsaglia and Tsang approach (which should *not* be
used as the resulting generator has be improved as suggested by Leong et
al.), the improved Leong et al variant, a version from the GNU GSL, a version
from the GNU Gretl econometric program as well as a version from QuantLib.
### Demo
The package contains several demo scripts. Try
R> demo(package="RcppZiggurat")
### TODO
More testing never hurts, ...
More generators as e.g. the modified Ziggurat implementation suggested by
Doornik (though his code is not under an open source licence)
### Author
Dirk Eddelbuettel
### License
GPL (>= 2)