STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::random::RandomNumberMill< T > Class Template Reference

An series of "Xorshiro128+" generators, with state vectors for all of them and the means for seeding the series based on long jumps from a single state vector. More...

#include <random.h>

Public Member Functions

size_t getGeneratorCount () const
 Get the number of (forward-jumped) generators.
 
size_t getDepth () const
 Get the depth of the bank for each generator.
 
size_t getRefreshStride () const
 Get the number of generators for which to refesh all banked values at one time.
 
getBankValue (size_t generator_index, size_t layer_index) const
 Get a random number out of the bank.
 
void uniformRandomNumbers (size_t first_gen, size_t last_gen)
 Populate a portion of this object's bank with random numbers from each of the respective generators.
 
void gaussianRandomNumbers (size_t first_gen, size_t last_gen)
 Populate a portion of this object's bank with normally distributed random numbers from each of the respective generators.
 
 RandomNumberMill (const ullint2 state_in, size_t generators_in=1LLU, size_t depth_in=2LLU, RandomNumberKind init_kind=RandomNumberKind::GAUSSIAN, size_t bank_limit=constants::giga_zu)
 The constructor can work off of a simple random initialization seed integer or a specific state vector for the first generator in the series.
 
 RandomNumberMill (const ullint4 state_in, size_t generators_in=1LLU, size_t depth_in=2LLU, RandomNumberKind init_kind=RandomNumberKind::GAUSSIAN, size_t bank_limit=constants::giga_zu)
 
 RandomNumberMill (size_t generators_in=1LLU, size_t depth_in=2LLU, RandomAlgorithm style_in=RandomAlgorithm::XOSHIRO_256PP, RandomNumberKind init_kind=RandomNumberKind::GAUSSIAN, int igseed_in=default_random_seed, int niter=default_xoshiro256pp_scrub, size_t bank_limit=constants::giga_zu)
 

Detailed Description

template<typename T>
class stormm::random::RandomNumberMill< T >

An series of "Xorshiro128+" generators, with state vectors for all of them and the means for seeding the series based on long jumps from a single state vector.

Constructor & Destructor Documentation

◆ RandomNumberMill()

template<typename T>
stormm::random::RandomNumberMill< T >::RandomNumberMill ( const ullint2 state_in,
size_t generators_in = 1LLU,
size_t depth_in = 2LLU,
RandomNumberKind init_kind = RandomNumberKind::GAUSSIAN,
size_t bank_limit = constants::giga_zu )

The constructor can work off of a simple random initialization seed integer or a specific state vector for the first generator in the series.

Parameters
generators_inThe count of generators in the series
depth_inQuantity of random numbers from each generator to store in the bank
init_kindStyle in which to initialize the random numbers in the bank, i.e. from a uniform or a normal distribution
igseed_inThe seed for the first generator in the series
niterThe number of iterations to use in initializing each generator
bank_limitThe maximum length of the random number cache
state_inThe state to apply to generator zero, thus determining the initial states of all other generators

Member Function Documentation

◆ gaussianRandomNumbers()

template<typename T>
void stormm::random::RandomNumberMill< T >::gaussianRandomNumbers ( size_t first_gen,
size_t last_gen )

Populate a portion of this object's bank with normally distributed random numbers from each of the respective generators.

Parameters
first_genIndex of the first generator to draw random numbers from
last_genIndex of the generator before which to stop drawing new random numbers

◆ getBankValue()

template<typename T>
T stormm::random::RandomNumberMill< T >::getBankValue ( size_t generator_index,
size_t layer_index ) const

Get a random number out of the bank.

Parameters
generator_indexThe generator series from which to obtain the value
layer_indexLayer from which to obtain the value

◆ uniformRandomNumbers()

template<typename T>
void stormm::random::RandomNumberMill< T >::uniformRandomNumbers ( size_t first_gen,
size_t last_gen )

Populate a portion of this object's bank with random numbers from each of the respective generators.

Parameters
first_genIndex of the first generator to draw random numbers from
last_genIndex of the generator before which to stop drawing new random numbers

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