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)
 Convenience for the engine's {seed+off, ..., seed+off+5} idiom.
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 69 of file rng_ssj.h.

Constructor & Destructor Documentation

◆ Mrg32k3a()

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

Definition at line 71 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 90 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 114 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 74 of file rng_ssj.h.

Referenced by set_seed_offset().

◆ set_seed_offset()

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

Convenience for the engine's {seed+off, ..., seed+off+5} idiom.

Definition at line 80 of file rng_ssj.h.

References 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 120 of file rng_ssj.h.


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