Random Number Generators.
This package offers the basic facilities for generating uniform random numbers. It provides an interface called umontreal.ssj.rng.RandomStream and some implementations of that interface. The interface specifies that each stream of random numbers is partitioned into multiple substreams and that methods are available to jump between the substreams, as discussed in [122], [120], [137], [158], [144]. For an example of how to use these streams properly, see InventoryCRN
in the set of example programs.
Each implementation uses a specific backbone uniform random number generator (RNG), whose period length is typically partitioned into very long non-overlapping segments to provide the streams and substreams. A stream can generate uniform variates (real numbers) over the interval (0,1), uniform integers over a given range of values \(\{i,…,j\}\), and arrays of these.
The generators provided here have various speeds and period lengths. umontreal.ssj.rng.MRG32k3a is the one that has been most extensively tested, but it is not among the fastest. The umontreal.ssj.rng.LFSR113, umontreal.ssj.rng.GenF2w32, umontreal.ssj.rng.MT19937, and the WELL
generators produce sequences of bits that obey a linear recurrence, so they eventually fail statistical tests that measure the linear complexity of these bits sequences. But this can affect only very special types of applications.
We recommend primarily umontreal.ssj.rng.MRG31k3p, umontreal.ssj.rng.MRG32k3a, and umontreal.ssj.rng.LFSR113. Note that all the generators provided currently in SSJ were originally designed for 32-bit computers.
For each base generator, the following tables give the approximate period length (period), the CPU time (in seconds) to generate \(10^9\) \(U(0,1)\) random numbers (gen. time), and the CPU time to jump ahead \(10^6\) times to the next substream (jump time). The following timings were on a 2100 MHz 32-bit AMD Athlon XP 2800+ computer running Linux, with the JDK 1.4.2.
The following timings are on a 2400 MHz 64-bit AMD Athlon 64 Processor 4000+ computer running Linux, with the JDK 1.5.0.
Other tools included in this package permit one to manage and synchronize several streams simultaneously ( umontreal.ssj.rng.RandomStreamManager ), to create random stream factories for a given type of stream ( umontreal.ssj.rng.BasicRandomStreamFactory ), and to apply automatic transformations to the output of a given stream ( umontreal.ssj.rng.AntitheticStream and umontreal.ssj.rng.BakerTransformedStream ).
For further details about uniform RNGs, we refer the reader to [112], [150], [154], [157], [158], [159] .
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4