RANLIB
Random Number Generators
RANLIB
a FORTRAN77 library which
can generate samples from a variety of probability density functions.
The routines, and the probability density functions they sample, include:
-
GENBET, Beta distribution;
-
GENCHI, Chi-Square distribution;
-
GENEXP, Exponential distribution;
-
GENF, F distribution;
-
GENGAM, Gamma distribution;
-
GENMN, multivariate normal distribution;
-
GENMUL, multinomial distribution;
-
GENNCH, noncentral Chi-Square distribution;
-
GENNF, noncentral F distribution;
-
GENNOR, normal distribution;
-
GENUNF, uniform distribution on [0,1];
-
IGNBIN, binomial distribution;
-
IGNLGI, uniform distribution on integers between 1 and 2147483562;
-
IGNNBN, negative binomial distribution.
-
IGNPOI, Poisson distribution.
-
IGNUIN, uniform distribution on integers in a given range.
Related Data and Programs:
CVT,
a FORTRAN90 library which
computes elements of a Centroidal Voronoi Tessellation.
FAURE,
a FORTRAN90 library which
computes elements of a Faure quasirandom sequence.
GRID,
a FORTRAN90 library which
computes elements of a grid dataset.
HALTON,
a FORTRAN90 library which
computes elements of a Halton quasirandom sequence.
HAMMERSLEY,
a FORTRAN90 library which
computes elements of a Hammersley quasirandom sequence.
HEX_GRID,
a FORTRAN90 library which
computes elements of a hexagonal grid dataset.
HEX_GRID_ANGLE,
a FORTRAN90 library which
computes elements of an angled hexagonal grid dataset.
IHS,
a FORTRAN90 library which
computes elements of an improved distributed Latin hypercube dataset.
LATIN_CENTER,
a FORTRAN90 library which
computes elements of a Latin Hypercube dataset, choosing center points.
LATIN_EDGE,
a FORTRAN90 library which
computes elements of a Latin Hypercube dataset, choosing edge points.
LATIN_RANDOM,
a FORTRAN90 library which
computes elements of a Latin Hypercube dataset, choosing
points at random.
LCVT,
a FORTRAN90 library which
computes a latinized Centroidal Voronoi Tessellation.
NIEDERREITER2,
a FORTRAN90 library which
computes elements of a Niederreiter quasirandom sequence with base 2.
NORMAL,
a FORTRAN77 library which
computes elements of a
sequence of pseudorandom normally distributed values.
SOBOL,
a FORTRAN90 library which
computes elements of a Sobol quasirandom sequence.
UNIFORM,
a FORTRAN77 library which
computes elements of a pseudorandom uniform sequence.
VAN_DER_CORPUT,
a FORTRAN90 library which
computes elements of a van der Corput quasirandom sequence.
Reference:
-
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.
-
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.
-
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.
-
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.
-
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.
-
Russell Cheng,
Generating Beta Variates with Nonintegral Shape Parameters,
Communications of the ACM,
Volume 21, 1978, pages 317-322.
-
Luc Devroye,
Non-Uniform Random Variate Generation,
Springer, 1986,
ISBN: 0387963057,
LC: QA274.D48.
-
Voratas Kachitvichyanukul, Bruce Schmeiser,
Binomial Random Variate Generation,
Communications of the ACM,
Volume 31, Number 2, February 1988, page 216-222.
-
Pierre LEcuyer, Serge Cote,
Implementing a Random Number Package with Splitting Facilities,
ACM Transactions on Mathematical Software,
Volume 17, 1991, pages 98-111.
Source Code:
Examples and Tests:
List of Routines:
-
ADVNST advances the state of the current generator.
-
GENBET generates a BETA random deviate.
-
GENCHI generates a Chi-Square random deviate.
-
GENEXP generates an exponential random deviate.
-
GENF generates an F random deviate.
-
GENGAM generates a Gamma random deviate.
-
GENMN generates a multivariate normal deviate.
-
GENMUL generates a multinomial random deviate.
-
GENNCH generates a noncentral Chi-Square random deviate.
-
GENNF generates a noncentral F random deviate.
-
GENNOR generates a normal random deviate.
-
GENPRM generates and applies a random permutation to an array.
-
GENUNF generates a uniform random deviate.
-
GETCGN gets the index of the current random number generator.
-
SETCGN sets the current random number generator.
-
GETSD returns the value of the random number generator seeds.
-
IGNBIN generates a binomial random deviate.
-
IGNLGI generates a random positive integer.
-
IGNNBN generates a negative binomial random deviate.
-
IGNPOI generates a Poisson random deviate.
-
IGNUIN generates a random integer in a given range.
-
INITGN initializes the current random number generator.
-
INRGCM initializes the random number generator common memory.
-
LENNOB counts the length of a string, ignoring trailing blanks.
-
MLTMOD carries out modular multiplication.
-
PHRTST converts a phrase to a pair of random number generator seeds.
-
QRGNIN determines whether the random number generator was initialized.
-
QRGNSN records whether the random number generator was initialized.
-
RANF returns a uniform random number.
-
SETALL sets the initial seeds of all the generators.
-
RGNQSD queries whether the random number seed was set.
-
SETANT sets the antithetic switch.
-
SETGMN sets the routine that generates multivariate normal deviates.
-
SETSD sets the seed of the current random number generator.
-
SEXPO evaluates the standard exponential distribution.
-
SGAMMA evaluates the standard Gamma distribution.
-
SNORM evaluates the standard normal distribution.
-
COVAR computes the covariance of two vectors.
-
PRCOMP prints covariance information.
-
SETCOV sets a covariance matrix from variance and common correlation.
-
STATS computes statistics.
-
TRSTAT returns the mean and variance for distributions.
You can go up one level to
the FORTRAN77 source codes.
Last revised on 10 December 2007.