ranlib


RANLIB, a Python code which produces random samples from Probability Density Functions (PDF), including Beta, Chi-square Exponential, F, Gamma, Multivariate normal, Noncentral chi-square, Noncentral F, Univariate normal, random permutations, Real uniform, Binomial, Negative Binomial, Multinomial, Poisson and Integer uniform, by Barry Brown and James Lovato.

RANLIB relies on streams of uniform random numbers generated by a lower level package called RNGLIB. A copy of RNGLIB must be available in order for RANLIB to executed. The RNGLIB routines provide 32 virtual random number generators. Each generator can provide 1,048,576 blocks of numbers, and each block is of length 1,073,741,824. Any generator can be set to the beginning or end of the current block or to its starting value. Packaging is provided so that if these capabilities are not needed, a single generator with period 2.3 X 10^18 is seen.

The routines, and the probability density functions they sample, include:

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

ranlib is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Programs:

asa183, a Python code which implements a random number generator (RNG), by Wichman and Hill. This is a version of Applied Statistics Algorithm 183.

halton, a Python code which computes elements of a Halton quasirandom sequence.

hammersley, a Python code which computes elements of a Hammersley quasirandom sequence.

normal, a Python code which computes elements of a sequence of pseudorandom normally distributed values.

pdflib, a Python code which evaluates Probability Density Functions (PDF's) and produces random samples from them, including beta, binomial, chi, exponential, gamma, inverse chi, inverse gamma, multinomial, normal, scaled inverse chi, and uniform.

prob, a Python code which evaluates, samples and inverts a number of Probability Density Functions (PDF).

randlc, a Python code which implements a random number generator (RNG) used by the NAS Benchmark programs.

random_sorted, a Python code which generates vectors of random values which are already sorted.

rnglib, a Python code which implements a random number generator (RNG) with splitting facilities, allowing multiple independent streams to be computed, by L'Ecuyer and Cote.

sobol, a Python code which computes elements of a Sobol quasirandom sequence.

uniform, a Python code which computes elements of a pseudorandom uniform sequence.

van_der_corput, a Python code which computes elements of a van der Corput quasirandom sequence.

walker_sample, a Python code which efficiently samples a discrete probability vector using Walker sampling.

Author:

Original FORTRAN77 version by Barry Brown, James Lovato. Python version by John Burkardt.

Reference:

  1. Joachim Ahrens, Ulrich Dieter,
    Computer Methods for Sampling From the Exponential and Normal Distributions,
    Communications of the ACM,
    Volume 15, Number 10, October 1972, pages 873-882.
  2. Joachim Ahrens, Ulrich Dieter,
    Generating Gamma Variates by a Modified Rejection Technique,
    Communications of the ACM,
    Volume 25, Number 1, January 1982, pages 47-54.
  3. Joachim Ahrens, Ulrich Dieter,
    Computer Generation of Poisson Deviates From Modified Normal Distributions,
    ACM Transactions on Mathematical Software,
    Volume 8, Number 2, June 1982, pages 163-179.
  4. Joachim Ahrens, Ulrich Dieter,
    Computer Methods for Sampling from Gamma, Beta, Poisson and Binomial Distributions,
    Computing,
    Volume 12, Number 3, September 1974, pages 223-246.
  5. Joachim Ahrens, Ulrich Dieter,
    Extensions of Forsythe's Method for Random Sampling from the Normal Distribution,
    Mathematics of Computation,
    Volume 27, Number 124, October 1973, page 927-937.
  6. Russell Cheng,
    Generating Beta Variates with Nonintegral Shape Parameters,
    Communications of the ACM,
    Volume 21, Number 4, April 1978, pages 317-322.
  7. Luc Devroye,
    Non-Uniform Random Variate Generation,
    Springer, 1986,
    ISBN: 0387963057,
    LC: QA274.D48.
  8. Voratas Kachitvichyanukul, Bruce Schmeiser,
    Binomial Random Variate Generation,
    Communications of the ACM,
    Volume 31, Number 2, February 1988, page 216-222.
  9. Pierre LEcuyer, Serge Cote,
    Implementing a Random Number Package with Splitting Facilities,
    ACM Transactions on Mathematical Software,
    Volume 17, Number 1, March 1991, pages 98-111.

Source Code:


Last revised on 03 September 2018.