ConstantRV

class ConstantRV @JvmOverloads constructor(var constVal: Double, name: String? = null) : ParameterizedRV(source)

Allows a constant value to pretend to be a random variable

Constructors

Link copied to clipboard
constructor(constVal: Double, name: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var antithetic: Boolean

Tells the stream to start producing antithetic variates

Link copied to clipboard
Link copied to clipboard
open override val parameters: RVParameters
Link copied to clipboard
open override val streamNumber: Int

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(): ConstantRV

Creates an instance of the random variable that is independent of the underlying stream provider but has an underlying stream that is in the exact same state as the random variable's stream, except that it is set to produce antithetic pseudo-random numbers (1-u). That is, its stream is a clone and will produce the antithetic sequence of pseudo-random numbers (i.e. 1-u1, 1-u2, 1-u3,...).

Link copied to clipboard
open override fun instance(streamNum: Int, rnStreamProvider: RNStreamProviderIfc): ConstantRV
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

Link copied to clipboard
open override fun toString(): String