Created by Scott Robert Ladd at Coyote Gulch Productions.
#include <prng.h>
Inheritance diagram for libcoyotl::prng:
|
The constructor initializes the prng seed from either the time or some stochastic source such as /dev/random or /dev/urandom. |
|
Starts the PRNG with a specific seed; this is provided so that a given sequence of "random" values can be duplicated. Note that the actual sequence is predicated on the specific PRNG algorithm.
|
|
Returns the next uint32_t in sequence.
Implemented in libcoyotl::cmwc4096, libcoyotl::kissrng, libcoyotl::mwc1038, and libcoyotl::mwc256. |
|
Returns the next value as a size_t "index" in the range [0,length).
|
|
Returns the next int_value between lo and hi, inclusive.
|
|
Returns the next real number in the range [0,1], i.e., a number greater than or equal to 0 and less than or equal to 1. Provides 32-bit precision.
|
|
Returns the next real number in the range [0,1), i.e., a number greater than or equal to 0 and less than 1. Provides 32-bit precision.
|
|
Returns the next real number in the range (0,1), i.e., a number greater than 0 and less than 1. Provides 32-bit precision.
|
|
Returns the next real number in the range [0,1), i.e., a number greater than or equal to 0 and less than 1. Provides 53-bit precision.
|
|
Returns the seed value used to initialize this generator.
|
|
Resets the generator using the provided seed value.
Reimplemented in libcoyotl::cmwc4096, libcoyotl::kissrng, libcoyotl::mwc1038, and libcoyotl::mwc256. |
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.