EmpiricalRV

class EmpiricalRV @JvmOverloads constructor(data: DoubleArray, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null) : ParameterizedRV(source)

A random variable that samples from the provided data. Each value is equally likely to occur.

Parameters

data

the data to sample from

streamNum

the random number stream number, defaults to 0, which means the next stream

streamProvider

the provider of random number streams, defaults to KSLRandom.DefaultRNStreamProvider

name

an optional name

Constructors

Link copied to clipboard
constructor(lowerLimit: Double, numPoints: Int, width: Double, streamNumber: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null)

Creates a series of numPoints points starting at the lower limit, each width units apart. Each point in the series will be equally likely to occur.

constructor(interval: Interval, numPoints: Int, streamNumber: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null)

Creates a series of numPoints points starting at the lower limit, each an equal distance apart based on the number of points. Each point in the series will be equally likely to occur.

constructor(data: DoubleArray, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null)

Properties

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

A copy of the data array is returned

Functions

Link copied to clipboard
open override fun instance(streamNum: Int, rnStreamProvider: RNStreamProviderIfc): EmpiricalRV
Link copied to clipboard
open override fun toString(): String