![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
java.util.Random, the 48-bit LCG of the Java Language Specification. More...
#include <line/util/rng_ssj.h>
Public Member Functions | |
| JavaRandom (long long seed=0) | |
| void | set_seed (long long seed) |
| Java's setSeed: scramble by 0x5DEECE66D and mask to 48 bits. | |
| int32_t | next (int bits) |
| Java's next(bits). | |
| int32_t | next_int () |
| Java's nextInt(). | |
| int32_t | next_int (int32_t bound) |
| Java's nextInt(bound), including the rejection loop it documents. | |
| double | next_double () |
| Java's nextDouble(): a 26-bit and a 27-bit draw. | |
| int64_t | next_long () |
| Java's nextLong(). | |
| bool | next_boolean () |
| Java's nextBoolean(). | |
| double | next_gaussian () |
| Java's nextGaussian(), the polar method with its cached second value. | |
java.util.Random, the 48-bit LCG of the Java Language Specification.
The engine uses 23 of these alongside the MRG streams, for the choices that are draws rather than variates: which batch size a BMAP service releases, which branch a probabilistic route takes, and so on. Transcribed rather than approximated, for the same reason as above.
|
inlineexplicit |
Definition at line 170 of file rng_ssj.h.
References set_seed().
|
inline |
Java's next(bits).
Definition at line 179 of file rng_ssj.h.
Referenced by next_boolean(), next_double(), next_int(), next_int(), and next_long().
|
inline |
|
inline |
Java's nextDouble(): a 26-bit and a 27-bit draw.
Definition at line 202 of file rng_ssj.h.
References next().
Referenced by next_gaussian().
|
inline |
Java's nextGaussian(), the polar method with its cached second value.
Definition at line 216 of file rng_ssj.h.
References next_double().
|
inline |
|
inline |
Java's nextInt(bound), including the rejection loop it documents.
Definition at line 188 of file rng_ssj.h.
References line::InputError::InputError(), and next().
|
inline |
|
inline |
Java's setSeed: scramble by 0x5DEECE66D and mask to 48 bits.
Definition at line 173 of file rng_ssj.h.
Referenced by JavaRandom().