RNStreamIfc

Represents a random number stream with stream control

Author

rossetti

Inheritors

Properties

Link copied to clipboard

If true, the stream will automatically participate in having its stream advanced to the next sub-stream via stream managers

Link copied to clipboard
abstract var antithetic: Boolean

Tells the stream to start producing antithetic variates

Link copied to clipboard
abstract val antitheticValue: Double

Returns the antithetic value of the previous value

Link copied to clipboard
abstract val id: Int
Link copied to clipboard
abstract val previousU: Double

The previous U(0,1) generated (returned) by randU01()

Link copied to clipboard

If true, the stream will automatically participate in having its stream reset to its start stream via stream managers

Functions

Link copied to clipboard
abstract fun advanceToNextSubStream()

Positions the RNG at the beginning of its next substream

Link copied to clipboard
abstract fun antitheticInstance(name: String? = null): RNStreamIfc
Link copied to clipboard
abstract fun instance(name: String? = null): RNStreamIfc

Returns a copy of the stream that has exactly the same state

Link copied to clipboard
open fun randInt(range: IntRange): Int

A convenience function for allowing the range to be specified via a range

open fun randInt(i: Int, j: Int): Int

Returns a (pseudo)random number from the discrete uniform distribution over the integers {i, i + 1, . . . , j }, using this stream. Calls randU01 once.

Link copied to clipboard
abstract fun randU01(): Double

Returns a pseudo-random uniformly distributed number

Link copied to clipboard
abstract fun resetStartStream()

The resetStartStream method will position the RNG at the beginning of its stream. This is the same location in the stream as assigned when the RNG was created and initialized.

Link copied to clipboard
abstract fun resetStartSubStream()

Resets the position of the RNG at the start of the current substream