Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binomial: Faster sampling for n * p >= 10 #740

Merged
merged 7 commits into from Apr 1, 2019

Commits on Mar 29, 2019

  1. Implement the BTPE for binomial sampling

    This should be more efficient than our previous algorithm, see [1].
    The implementation is close to the algorithm as specified in the paper,
    where many goto statements are used. It can still be refactored to be
    more readable.
    
    [1] Voratas Kachitvichyanukul and Bruce W. Schmeiser. 1988. Binomial
        random variate generation. Commun. ACM 31, 2 (February 1988),
        216-222. http://dx.doi.org/10.1145/42372.42381
    vks committed Mar 29, 2019
    Copy the full SHA
    daa02bd View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    4333a77 View commit details
    Browse the repository at this point in the history
  3. Binomial: Simplify code

    vks committed Mar 29, 2019
    Copy the full SHA
    cd822a0 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    f9cae57 View commit details
    Browse the repository at this point in the history
  5. Binomial: Use correct sign for stirling correction

    This was noted by the GSL implementors. The new signs were confirmed by
    one of the authors publishing the original algorithm.
    vks committed Mar 29, 2019
    Copy the full SHA
    f6d7407 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    6e82023 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    f8149ab View commit details
    Browse the repository at this point in the history