SST/macro
|
A simple random generator using MWC, CONG, and SHR3 by George Marsaglia (1999; internet posting). More...
#include <rng.h>
Public Member Functions | |
virtual std::string | to_string () const |
~SimpleCombo () | |
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 SimpleCombo * | construct () |
static SimpleCombo * | construct (const std::vector< rngint_t > &) |
static SimpleCombo * | construct (rngint_t zarg) |
static SimpleCombo * | construct (rngint_t zarg, rngint_t warg) |
static SimpleCombo * | construct (rngint_t zarg, rngint_t warg, rngint_t jsrarg) |
static SimpleCombo * | construct (rngint_t zarg, rngint_t warg, rngint_t jsrarg, rngint_t jcongarg) |
Protected Member Functions | |
SimpleCombo () | |
Private Attributes | |
MWC * | mwc_ |
CONG * | cong_ |
SHR3 * | shr3_ |
A simple random generator using MWC, CONG, and SHR3 by George Marsaglia (1999; internet posting).
Here is an excerpt from the posting describing this generator: The KISS generator, (Keep It Simple Stupid), is designed to combine the two multiply-with-carry generators in MWC with the 3-shift register SHR3 and the congruential generator CONG, using addition and exclusive-or. Period about 2123. It is one of my favorite generators.
RNG::SimpleCombo::~SimpleCombo | ( | ) |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
virtual |
Implements RNG::UniformInteger.
|
inlinevirtual |
|
inlinevirtual |
Implements RNG::UniformInteger.
Definition at line 341 of file rng.h.
References RNG::UniformInteger::nseed(), and RNG::UniformInteger::vec_reseed().
|
virtual |
Implements RNG::UniformInteger.