AR1CorrelatedRNStream

class AR1CorrelatedRNStream(lag1Corr: Double, stream: RNStreamIfc = KSLRandom.nextRNStream()) : RNStreamIfc

Uses the autoregressive to anything algorithm to generate correlated uniform variates. The user supplies the correlation of the underlying AR(1) process. The resulting correlation in the u's may not necessarily meet this correlation, due to the correlation matching problem.

Constructors

Link copied to clipboard
constructor(lag1Corr: Double, stream: RNStreamIfc = KSLRandom.nextRNStream())

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
open override var antithetic: Boolean

Tells the stream to start producing antithetic variates

Link copied to clipboard
open override val antitheticValue: Double

Returns the antithetic value of the previous value

Link copied to clipboard
Link copied to clipboard
open override val id: Int
Link copied to clipboard
open override val previousU: Double

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

Link copied to clipboard
open override var resetStartStreamOption: Boolean

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

Functions

Link copied to clipboard
open override fun advanceToNextSubStream()

Positions the RNG at the beginning of its next substream

Link copied to clipboard
open override fun antitheticInstance(name: String?): RNStreamIfc
Link copied to clipboard
open override fun instance(name: String?): RNStreamIfc

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

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

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

open override 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
open override fun randU01(): Double

Returns a pseudo-random uniformly distributed number

Link copied to clipboard
open override 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
open override fun resetStartSubStream()

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