RNStreamFactory

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Instances of RNStream are what is made by the factory. Each created stream should be 2 to 127 {@literal 2^127} steps ahead of the last stream created.

Functions

Link copied to clipboard
fun advanceSeeds(n: Int = 1)

Advances the seeds n times. Acts as if n streams were created, without actually creating the streams. The seeds will be advanced 2^127 steps

Link copied to clipboard

Gets the default initial package seed: seed = {12345, 12345, 12345, 12345, 12345, 12345};

Link copied to clipboard

Returns the current factory seed. This is essentially the "state" of the generator.

Link copied to clipboard
fun nextStream(name: String? = null): RNStreamIfc

Tells the factory to make and return a RNStream with the provided name

Link copied to clipboard

Resets the package seed to the default initial package seed: seed = {12345, 12345, 12345, 12345, 12345, 12345};

Link copied to clipboard
fun setFactorySeed(seed: LongArray = longArrayOf(12345, 12345, 12345, 12345, 12345, 12345))

Sets the initial seed to the six integers in the vector seed0..5. This will be the seed (initial state) of the first stream. By default, this seed is (12345, 12345, 12345, 12345, 12345, 12345).