Scythe-1.0.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
scythe::lecuyer Class Reference

The L'Ecuyer random number generator. More...

#include <scythestat/rng/lecuyer.h>

Inheritance diagram for scythe::lecuyer:
Inheritance graph
[legend]
Collaboration diagram for scythe::lecuyer:
Collaboration graph
[legend]

List of all members.

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]

Detailed Description

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 $3.1 \times 10^{57}$. 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.

See also:
rng
mersenne

The documentation for this class was generated from the following file: