LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::rng::Mrg32k3a Class Reference

SSJ's umontreal.ssj.rng.MRG32k3a, state and all. More...

#include <line/util/rng_ssj.h>

Public Member Functions

 Mrg32k3a ()
void set_seed (const long long s[6])
 SSJ's setSeed(long[6]).
void set_seed_offset (long long seed, long long offset)
 The stream an LDES engine names by (run seed, offset): its seeds hashed by SeedHash.
double next_double ()
 SSJ's nextValue(): the combined generator, returning a double in (0, 1).
int next_int (int i, int j)
 SSJ's nextInt(i, j): a uniform integer on [i, j].
double state (int i) const
 The six state doubles, for tests that pin the state and not only the draws.

Detailed Description

SSJ's umontreal.ssj.rng.MRG32k3a, state and all.

The state is the six doubles (Cg[0..5]) SSJ keeps; set_seed takes the same six-long vector setSeed(long[]) takes and applies the same validation, so a call site can be transcribed from the Java verbatim.

Definition at line 120 of file rng_ssj.h.

Constructor & Destructor Documentation

◆ Mrg32k3a()

line::rng::Mrg32k3a::Mrg32k3a ( )
inline

Definition at line 122 of file rng_ssj.h.

Member Function Documentation

◆ next_double()

double line::rng::Mrg32k3a::next_double ( )
inline

SSJ's nextValue(): the combined generator, returning a double in (0, 1).

Never returns 0; may return values arbitrarily close to 1.

Definition at line 141 of file rng_ssj.h.

Referenced by next_int(), and line::ldes::engine::uniform01().

◆ next_int()

int line::rng::Mrg32k3a::next_int ( int i,
int j )
inline

SSJ's nextInt(i, j): a uniform integer on [i, j].

Definition at line 165 of file rng_ssj.h.

References line::InputError::InputError(), and next_double().

◆ set_seed()

void line::rng::Mrg32k3a::set_seed ( const long long s[6])
inline

SSJ's setSeed(long[6]).

Values are taken modulo the two moduli.

Definition at line 125 of file rng_ssj.h.

Referenced by line::ldes::engine::ln_rng(), and set_seed_offset().

◆ set_seed_offset()

void line::rng::Mrg32k3a::set_seed_offset ( long long seed,
long long offset )
inline

The stream an LDES engine names by (run seed, offset): its seeds hashed by SeedHash.

Definition at line 131 of file rng_ssj.h.

References line::rng::SeedHash::SeedHash(), and set_seed().

Referenced by line::ldes::engine::Rng::Rng().

◆ state()

double line::rng::Mrg32k3a::state ( int i) const
inline

The six state doubles, for tests that pin the state and not only the draws.

Definition at line 171 of file rng_ssj.h.


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