This repository has been archived by the owner on Mar 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
providing random number generators and 3 discrete distributions #9
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
added random-number-generator.lisp: base class, cl wrapper, and gsll added GSLL dependency for call GSL's random number generators added draw-bernoulli-bit: same as draw-bernoulli, but returns 0/1 instead of NIL/T bugfix draw-bernoulli: return boolean for integer probabilities instead of 0,1 added tests for bugfix
added tests fixed method next for gsll-rng to return the correct type
…mber generators, these can serve as comparison to test correctness of implementation
tpapp
added a commit
that referenced
this pull request
Dec 28, 2014
providing random number generators and 3 discrete distributions
Thanks. I am not using CL very much these days so the code is dormant, but if you want to contribute to this library I am happy to give you write access to the repo, just let me know. |
Yes, I'd like write access. Thanks. |
Done. I wonder if you could add a full name to your Github account so people can recognize you on mailing lists etc. |
Good idea! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Univariate distributions
I added the Bernoulli, binomial, and geometric distribution; added
draw-poisson
; and made a bugfix indraw-bernoulli
.Random number generators
I added the possibility to use random number generators other than the one provided by the Common Lisp implementation. This allows users to switch random number generators without switching CL implementation, to seed the random number generator, and ultimately to use
cl-random
for all their random number needs.By default, all
draw
functions use*random-state*
, so old code relying oncl-random
will run unchanged.Some simple random number generators were added. The Mersenne Twister is being worked on.