- Preparing search index...
- The search index is not available
tvmjs
Class LinearCongruentialGenerator
Hierarchy
- LinearCongruentialGenerator
Properties
Readonly
increment
increment: number
Readonly
modulus
modulus: number
Readonly
multiplier
multiplier: number
Methods
nextInt
- nextInt(): number
-
Returns number
randomFloat
- randomFloat(): number
-
Returns number
setSeed
- setSeed(seed): void
-
Returns void
Linear congruential generator for random number generating that can be seeded.
Follows the implementation of
include/tvm/support/random_engine.h
, which follows the sepcification in https://en.cppreference.com/w/cpp/numeric/random/linear_congruential_engine.Note
Number.MAX_SAFE_INTEGER = 2^53 - 1
, and our intermediates are strictly less than 2^48.