Scythe-1.0.3
|
The L'Ecuyer random number generator. More...
#include <scythestat/rng/lecuyer.h>
Public Member Functions | |
std::string | name () const |
Get the stream's name. | |
void | ResetStartStream () |
Reset the stream. | |
void | ResetStartSubstream () |
Reset the current substream. | |
void | ResetNextSubstream () |
Jump to the next substream. | |
void | SetSeed (unsigned long seed[6]) |
Set the stream seed. | |
void | AdvanceState (long e, long c) |
Advances the state of the stream. | |
void | GetState (unsigned long seed[6]) const |
Get the current state. | |
void | IncreasedPrecis (bool incp) |
Toggle generator precision. | |
void | SetAntithetic (bool a) |
Toggle the orientation of generated random numbers. | |
double | runif () |
Generate a random uniform variate on (0, 1). | |
template<matrix_order O, matrix_style S> | |
Matrix< double, O, S > | runif (unsigned int rows, unsigned int cols) |
Generate a Matrix of random uniform variates. | |
Matrix< double, Col, Concrete > | runif (unsigned int rows, unsigned int cols) |
Generate a Matrix of random uniform variates. | |
long | RandInt (long low, long high) |
Generate the next random integer. | |
Static Public Member Functions | |
lecuyer (std::string streamname="") | |
Constructor. | |
static void | SetPackageSeed (unsigned long seed[6]) |
Set the package seed. | |
Protected Member Functions | |
double | U01 () |
double | U01d () |
Protected Attributes | |
double | Cg [6] |
double | Bg [6] |
double | Ig [6] |
bool | anti |
bool | incPrec |
std::string | streamname_ |
Static Protected Attributes | |
static double | nextSeed [6] |
The L'Ecuyer random number generator.
This class defines a random number generator, using Pierre L'Ecuyer's algorithm (2000) and source code (2001) for generating multiple simultaneous streams of random uniform variates. The period of the underlying single-stream generator is approximately . Each individual stream is implemented in terms of a sequence of substreams (see L'Ecuyer et al (2000) for details).
The lecuyer class extends Scythe's basic random number generating class, scythe::rng, implementing the interface that it defines.