C++ object oriented library for generating pseudorandom numbers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dokumentace
gnuplot_scripts
Makefile
README.1st
README.textile
abstract_uniform_generator.h
carnd.h
lgamma.h
main.cpp
mtwister.h
pseudorandom.h

README.textile

Pseudorandom numbers generator library

By Pavel fanda Novotný, Ota Pavelek

C++ object oriented library for generating pseudorandom numbers. It supports
many uniform generators and transforms numbers generated by them to some common
used probability distributions.

Using

  1. Include pseudorandom.h in Your project
  2. Create generator object: RandomGenerator rg((unsigned long)time(NULL));
  3. Use: double exp = rg.Exponential(3);

Generators of uniform distributions

  • Mersenne Twister
  • Cellular automaton based generator

About cellular automaton based generator

Anthony Pasqualoni created very good pseudorandom generator for number in
uniform distribution using 256-state cellular automaton
More information including tests and comparation with other generators (mt19937,
taus etc.) can be found at http://home.southernct.edu/~pasqualonia1/ca/report.html

Uniform generator change

Just pass class as teplate argument while creating RandomGenerator object.
RandomGenerator rg((unsigned long)time(NULL));
RandomGenerator rg((unsigned long)time(NULL));

News

24. 7. 2011

Pareto and Rayleigh distributions added.
More information about:
http://en.wikipedia.org/wiki/Pareto_distribution
http://www.brighton-webs.co.uk/distributions/pareto.asp
http://en.wikipedia.org/wiki/Rayleigh_distribution