Skip to content

Latest commit

 

History

History
153 lines (118 loc) · 6.52 KB

rnglib.md

File metadata and controls

153 lines (118 loc) · 6.52 KB

RNGLIB
A Package of Random Number Generators (RNG's) with Splitting Facilities {#rnglib-a-package-of-random-number-generators-rngs-with-splitting-facilities align="center"}


RNGLIB is a C++ library which implements random number generators (RNG's) which can generate one or more streams of random numbers.

RNGLIB is a portable set of software tools for uniform random variate generation. It provides for multiple generators running simultaneously, and each generator has its sequence of numbers partitioned into many long disjoint substreams. Simple procedure calls allow the user to make any generator jump ahead to the beginning of its next substream.

Licensing: {#licensing align="center"}

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

Languages: {#languages align="center"}

RNGLIB is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version and a PYTHON version.

Related Data and Programs: {#related-data-and-programs align="center"}

ASA183, a C++ library which implements the Wichman-Hill random number generator (RNG).

FAURE, a C++ library which computes elements of a Faure quasirandom sequence.

CPP_RANDOM, C++ programs which illustrate the use of C++'s random number generator (RNG) functions.

HALTON, a C++ library which computes elements of a Halton quasirandom sequence.

HAMMERSLEY, a C++ library which computes elements of a Hammersley quasirandom sequence.

NIEDERREITER2, a C++ library which computes elements of a Niederreiter quasirandom sequence with base 2.

NORMAL, a C++ library which implements random number generators (RNG's) for normally distributed values.

RANDLC, a C++ library which implements a random number generator (RNG) used by the NAS Benchmark programs.

RANDOM_MPI, a C++ program which demonstrates one way to generate the same sequence of random numbers for both sequential execution and parallel execution under MPI.

RANDOM_SORTED, a C++ library which generates vectors of random values which are already sorted.

RANLIB, a C++ library which produces random samples from Probability Density Functions (PDF's), 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.

SOBOL, a C++ library which computes elements of a Sobol quasirandom sequence.

UNIFORM, a C++ library which implements random number generators (RNG's) for a variety of arithmetic types.

VAN_DER_CORPUT, a C++ library which computes elements of a van der Corput quasirandom sequence.

WALKER_SAMPLE, a C++ library which efficiently samples a discrete probability vector using Walker sampling.

ZIGGURAT, a C++ program which generates points from a uniform, normal or exponential distribution, using the ziggurat method.

Reference: {#reference align="center"}

  1. 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: {#source-code align="center"}

Examples and Tests: {#examples-and-tests align="center"}

List of Routines: {#list-of-routines align="center"}

  • ADVANCE_STATE advances the state of the current generator.
  • ANTITHETIC_GET queries the antithetic value for a given generator.
  • ANTITHETIC_MEMORY stores the antithetic value for all generators.
  • ANTITHETIC_SET sets the antithetic value for a given generator.
  • CG_GET queries the CG values for a given generator.
  • CG_MEMORY stores the CG values for all generators.
  • CG_SET sets the CG values for a given generator.
  • CGN_GET gets the current generator index.
  • CGN_MEMORY stores the current generator index.
  • CGN_SET sets the current generator index.
  • GET_STATE returns the state of the current generator.
  • I4_UNI generates a random positive integer.
  • IG_GET queries the IG values for a given generator.
  • IG_MEMORY stores the IG values for all generators.
  • IG_SET sets the IG values for a given generator.
  • INIT_GENERATOR sets the state of generator G to initial, last or new seed.
  • INITIALIZE initializes the random number generator library.
  • INITIALIZED_GET queries the INITIALIZED value.
  • INITIALIZED_MEMORY stores the INITIALIZED value for the package.
  • INITIALIZED_SET sets the INITIALIZED value true.
  • LG_GET queries the LG values for a given generator.
  • LG_MEMORY stores the LG values for all generators.
  • LG_SET sets the LG values for a given generator.
  • MULTMOD carries out modular multiplication.
  • R4_UNI_01 returns a uniform random real number in [0,1].
  • R8_UNI_01 returns a uniform random double in [0,1].
  • SET_INITIAL_SEED resets the initial seed and state for all generators.
  • SET_SEED resets the initial seed and the state of generator G.
  • TIMESTAMP prints the current YMDHMS date as a time stamp.

You can go up one level to the C++ source codes.


Last revised on 05 August 2013.