|
SST/macro
|
The congruential random number generator by George Marsaglia (1999; internet posting). More...
#include <rng.h>


Public Member Functions | |
| virtual std::string | to_string () const |
| ~CONG () | |
| rngint_t | value () |
| void | vec_reseed (const std::vector< rngint_t > &seeds) |
| int | nseed () |
Public Member Functions inherited from RNG::UniformInteger | |
| virtual | ~UniformInteger () |
| rngint_t | value_in_range (rngint_t range) |
| virtual double | realvalue (bool include_zero=true, bool include_one=true) |
| Return a random value in the interval [0,1], (0,1], [0,1), or (0,1) More... | |
| void | reseed () |
| void | reseed (rngint_t) |
| void | reseed (rngint_t, rngint_t) |
| void | reseed (rngint_t, rngint_t, rngint_t) |
| void | reseed (rngint_t, rngint_t, rngint_t, rngint_t) |
Static Public Member Functions | |
| static CONG * | construct () |
| static CONG * | construct (const std::vector< rngint_t > &) |
| static CONG * | construct (rngint_t jcongarg) |
Protected Member Functions | |
| CONG () | |
| CONG (const std::vector< rngint_t > &) | |
| CONG (rngint_t jcongarg) | |
Private Attributes | |
| rngint_t | jcong |
The congruential random number generator by George Marsaglia (1999; internet posting).
This RNG is fast and has a very low memory footprint. Here is an excerpt from the posting describing this generator: CONG is a congruential generator with the widely used 69069 as multiplier: x(n)=69069x(n-1)+1234567. It has period 232. The leading half of its 32 bits seem to pass all tests, but bits in the last half are too regular.
| RNG::CONG::~CONG | ( | ) |
|
protected |
|
protected |
|
protected |
|
static |
|
virtual |
Implements RNG::UniformInteger.
|
inlinevirtual |
|
inlinevirtual |
Implements RNG::UniformInteger.
Definition at line 277 of file rng.h.
References RNG::UniformInteger::nseed(), and RNG::UniformInteger::vec_reseed().

|
virtual |
Implements RNG::UniformInteger.
1.8.11