STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::random::Xoroshiro128pGenerator Class Reference

The "Xoroshiro128+" random number generator. It's decent, but not recommended for situations where a quarter million or more streams are producing random number sequences in unison. Those streams can end up containing correlated patterns. This generator has been shown to fail BigCrush. More...

#include <random.h>

Public Member Functions

double uniformRandomNumber ()
 Return a single random number distributed over a uniform distribution [0, 1). This is an internal generator based on an integer vector state which will provide reproducible results across platforms.
 
float spUniformRandomNumber ()
 Return a single random number distributed over a uniform distribution [0, 1), in single-precision. While the XOR-shift random generators have a distinct method for producing single-precision random numbers (selecting the highest-quality bits), this merely calls uniformRandomNumber() and exists for compatibility with the other generators in templated xxxxRand() functions.
 
double gaussianRandomNumber ()
 Return a normally distributed random number with standard deviation 1.0. This works off of the uniform random number generator and will thus advance the state vector of the random number generator that produces the result.
 
float spGaussianRandomNumber ()
 Produce a single-precision random number on the normal distribution with a standard deviation of 1.0. Like spUniformRandomNumber(), this function merely calls gaussianRandomNumber() and exists for compatibility with other random number generators in templated functions.
 
void jump ()
 Jump forward 2^64 iterations in the sequence.
 
void longJump ()
 Jump forward 2^96 iterations in the sequence.
 
ullint2 revealState () const
 Reveal the current state of the generator.
 
ullint revealBitString () const
 Reveal the random bit string.
 
void setState (const ullint2 state_in)
 Set the current state of the generator.
 
 Xoroshiro128pGenerator (int igseed=default_random_seed, int niter=25)
 The constructor can start or restart the generator.
 
 Xoroshiro128pGenerator (const ullint2 state_in)
 

Detailed Description

The "Xoroshiro128+" random number generator. It's decent, but not recommended for situations where a quarter million or more streams are producing random number sequences in unison. Those streams can end up containing correlated patterns. This generator has been shown to fail BigCrush.

Constructor & Destructor Documentation

◆ Xoroshiro128pGenerator()

stormm::random::Xoroshiro128pGenerator::Xoroshiro128pGenerator ( int igseed = default_random_seed,
int niter = 25 )

The constructor can start or restart the generator.

Overloaded:

  • Initialize the generator upon construction.
  • Take the given state.
Parameters
igseedThe pseudo-randome number seed
niterNumber of iterations to run through while equilibrating the generator
state_inState to accept

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