Xoshiro128pp
Defined in: src/engine/xoshiro128pp.ts:26
The xoshiro128++ engine. Build one with xoshiro128pp.
Exposed for instanceof and for subclassing; the factory is the way to
make one.
Example
Section titled “Example”xoshiro128pp(42) instanceof Xoshiro128pp; // trueExtends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Xoshiro128pp(
state):Xoshiro128pp
Defined in: src/engine/prng-engine.ts:49
Parameters
Section titled “Parameters”Uint32Array
Returns
Section titled “Returns”Xoshiro128pp
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”algorithm
Section titled “algorithm”
readonlyalgorithm:"xoshiro128++"="xoshiro128++"
Defined in: src/engine/xoshiro128pp.ts:27
Identifies the algorithm in EngineState.
Overrides
Section titled “Overrides”seedable
Section titled “seedable”
readonlyseedable:true=true
Defined in: src/engine/prng-engine.ts:45
Whether the engine can be re-seeded. Math.random and the CSPRNG cannot.
Inherited from
Section titled “Inherited from”version
Section titled “version”
readonlyversion:number=1
Defined in: src/engine/prng-engine.ts:44
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”clone()
Section titled “clone()”clone():
this
Defined in: src/engine/prng-engine.ts:111
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”fillBytes()
Section titled “fillBytes()”fillBytes(
out):void
Defined in: src/engine/prng-engine.ts:65
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”fillUint32()
Section titled “fillUint32()”fillUint32(
out):void
Defined in: src/engine/prng-engine.ts:61
Parameters
Section titled “Parameters”Uint32Array
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getState()
Section titled “getState()”getState():
EngineState
Defined in: src/engine/prng-engine.ts:86
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”jump()
Section titled “jump()”jump():
void
Defined in: src/engine/xoshiro128pp.ts:73
Equivalent to 2^64 calls to nextUint32.
Returns
Section titled “Returns”void
longJump()
Section titled “longJump()”longJump():
void
Defined in: src/engine/xoshiro128pp.ts:78
Equivalent to 2^96 calls to nextUint32.
Returns
Section titled “Returns”void
nextFloat64()
Section titled “nextFloat64()”nextFloat64():
number
Defined in: src/engine/prng-engine.ts:55
A uniform double in [0, 1) with 53 bits of precision.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”nextUint32()
Section titled “nextUint32()”nextUint32():
number
Defined in: src/engine/xoshiro128pp.ts:29
A uniform integer in [0, 2^32).
Returns
Section titled “Returns”number
Overrides
Section titled “Overrides”reseed()
Section titled “reseed()”reseed(
seed):void
Defined in: src/engine/prng-engine.ts:120
Restart from new seed material, in place.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setState()
Section titled “setState()”setState(
state):void
Defined in: src/engine/prng-engine.ts:94
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”split()
Section titled “split()”split(
n):Engine[]
Defined in: src/engine/xoshiro128pp.ts:83
Non-overlapping streams, guaranteed by the jump polynomial.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Engine[]