Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

providing random number generators and 3 discrete distributions #9

Merged
merged 11 commits into from
Dec 28, 2014

Conversation

dcatteeu
Copy link
Collaborator

Univariate distributions

I added the Bernoulli, binomial, and geometric distribution; added draw-poisson; and made a bugfix in draw-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 on cl-random will run unchanged.

Some simple random number generators were added. The Mersenne Twister is being worked on.

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
@tpapp tpapp merged commit 8e43b26 into tpapp:master Dec 28, 2014
@tpapp
Copy link
Owner

tpapp commented Dec 28, 2014

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.

@dcatteeu
Copy link
Collaborator Author

Yes, I'd like write access. Thanks.

@tpapp
Copy link
Owner

tpapp commented Dec 28, 2014

Done. I wonder if you could add a full name to your Github account so people can recognize you on mailing lists etc.

@dcatteeu
Copy link
Collaborator Author

Good idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants