Object to encapsulate random number generation controls. Like other namelist encapsualtors, this object can take input file data as part of its construction, or by a series of setters. Validation of each piece of data is handled as it appears either in the contructor or via setters. Getter functions dispense the internal information to any application using STORMM libraries.
More...
#include <nml_random.h>
|
int | getRandomSeed () const |
| Get the random seed supplied (and possibly, as corrected) from user input.
|
|
int | getStreamCount () const |
| Get the number of random streams.
|
|
int | getProductionStride () const |
| Get the quantity of random numbers produced, per stream, each time a cache is filled.
|
|
int | getWarmupCycleCount () const |
| Get the number of warmup cycles for the prime stream generator.
|
|
const NamelistEmulator & | getTranscript () const |
| Get the original namelist emulator object as a transcript of the user input.
|
|
void | setRandomSeed (const int igseed_in) |
| Set the random seed.
|
|
void | setStreamCount (const int streams_in) |
| Set the quantity of random number streams.
|
|
void | setProductionStride (const int stride_in) |
| Set the random number production batch size, the quantity of random numbers that each stream will produce each time a cache is filled.
|
|
void | setWarmupCycles (const int cycles_in) |
| Set the number of warmup cycles through which to process the prime stream's random generator state prior to producing numbers in that stream or spawning new streams.
|
|
|
| RandomControls (ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO) |
| The constructor can prepare an object with default settings or read the corresponding namelist to accept user input.
|
|
| RandomControls (const TextFile &tf, int *start_line, bool *found_nml, ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO) |
|
|
| RandomControls (const RandomControls &original)=default |
| As with other control objects, copy and move constructors, plus copy and move assignment operators, can all take their default forms.
|
|
| RandomControls (RandomControls &&original)=default |
|
RandomControls & | operator= (const RandomControls &original)=default |
|
RandomControls & | operator= (RandomControls &&original)=default |
|
Object to encapsulate random number generation controls. Like other namelist encapsualtors, this object can take input file data as part of its construction, or by a series of setters. Validation of each piece of data is handled as it appears either in the contructor or via setters. Getter functions dispense the internal information to any application using STORMM libraries.
◆ RandomControls()
stormm::namelist::RandomControls::RandomControls |
( |
ExceptionResponse | policy_in = ExceptionResponse::DIE, |
|
|
WrapTextSearch | wrap = WrapTextSearch::NO ) |
The constructor can prepare an object with default settings or read the corresponding namelist to accept user input.
- Parameters
-
tf | Input file translated into RAM |
start_line | Line of the input file to begin searching for the &solvent namelist |
found_nml | Indication that the namelist was found (passed back to calling function) |
policy_in | Requested error handling behavior |
wrap | Indicate that the search for a &random namelist should carry on from the beginning of an input file if no such namelist is found starting from the original starting point |
◆ setProductionStride()
void stormm::namelist::RandomControls::setProductionStride |
( |
const int | stride_in | ) |
|
Set the random number production batch size, the quantity of random numbers that each stream will produce each time a cache is filled.
- Parameters
-
stride_in | The requested stride size |
◆ setRandomSeed()
void stormm::namelist::RandomControls::setRandomSeed |
( |
const int | igseed_in | ) |
|
Set the random seed.
- Parameters
-
igseed_in | The new choice of random seed (will be checked for validity) |
◆ setStreamCount()
void stormm::namelist::RandomControls::setStreamCount |
( |
const int | streams_in | ) |
|
Set the quantity of random number streams.
- Parameters
-
streams_in | The requested number of streams |
◆ setWarmupCycles()
void stormm::namelist::RandomControls::setWarmupCycles |
( |
const int | cycles_in | ) |
|
Set the number of warmup cycles through which to process the prime stream's random generator state prior to producing numbers in that stream or spawning new streams.
- Parameters
-
cycles_in | Requested number of cycles |
The documentation for this class was generated from the following files: