randomlySelect

fun <T> randomlySelect(dc: DataColumn<T>, stream: RNStreamIfc = KSLRandom.defaultRNStream()): T(source)

Randomly select an element from the data column

Return

the randomly selected element

Parameters

dc

the data column

stream

the source of randomness

Type Parameters

T

The type of element in the data column


fun <T> randomlySelect(dc: DataColumn<T>, streamNum: Int): T(source)

Randomly select an element from the data column

Return

the randomly selected element

Parameters

dc

the data column

streamNum

the stream number for the source of randomness

Type Parameters

T

The type of element in the data column


fun <T> randomlySelect(dc: DataColumn<T>, cdf: DoubleArray, stream: RNStreamIfc = KSLRandom.defaultRNStream()): T(source)

Randomly selects an element from the data column using the supplied cdf

Return

the randomly selected element

Parameters

dc

data column to select from

cdf

the cumulative probability associated with each element

stream

the source of randomness

Type Parameters

T

the type returned


fun <T> randomlySelect(dc: DataColumn<T>, cdf: DoubleArray, streamNum: Int): T(source)

Randomly selects an element from the data column using the supplied cdf

Return

the randomly selected element

Parameters

dc

data column to select from

cdf

the cumulative probability associated with each element

streamNum

the stream number for the source of randomness

Type Parameters

T

the type returned


fun <T> randomlySelect(df: DataFrame<T>, streamNum: Int): DataRow<T>(source)

Randomly select a row from the data frame

Return

the randomly selected row

Parameters

df

the data frame

streamNum

the stream number from the stream provider to use

Type Parameters

T

The type of element in the data frame


fun <T> randomlySelect(df: DataFrame<T>, stream: RNStreamIfc = KSLRandom.defaultRNStream()): DataRow<T>(source)

Randomly select a row from the data frame

Return

the randomly selected element

Parameters

df

the data frame

stream

the source of randomness

Type Parameters

T

The type of element in the data frame


fun <T> randomlySelect(df: DataFrame<T>, cdf: DoubleArray, streamNum: Int): DataRow<T>(source)

Randomly selects a row from the data frame using the supplied cdf

Return

the randomly selected row

Parameters

df

data frame to select from

cdf

the cumulative probability associated with each element of array

streamNum

the stream number from the stream provider to use

Type Parameters

T

the type returned


fun <T> randomlySelect(df: DataFrame<T>, cdf: DoubleArray, stream: RNStreamIfc = KSLRandom.defaultRNStream()): DataRow<T>(source)

Randomly selects from the data frame using the supplied cdf

Return

the randomly selected row

Parameters

df

data frame to select from

cdf

the cumulative probability associated with each element of array

stream

the source of randomness

Type Parameters

T

the type returned