randomlySelect

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

Randomly select an element from the data column

Return

the randomly selected element

Parameters

T

The type of element in the data column

dc

the data column

stream

the source of randomness


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

Randomly select an element from the data column

Return

the randomly selected element

Parameters

T

The type of element in the data column

dc

the data column

streamNum

the stream number for the source of randomness


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

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

Return

the randomly selected element

Parameters

T

the type returned

dc

data column to select from

cdf

the cumulative probability associated with each element

stream

the source of randomness


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

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

Return

the randomly selected element

Parameters

T

the type returned

dc

data column to select from

cdf

the cumulative probability associated with each element

streamNum

the stream number for the source of randomness


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

Randomly select a row from the data frame

Return

the randomly selected row

Parameters

T

The type of element in the data frame

df

the data frame

streamNum

the stream number from the stream provider to use


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

Randomly select a row from the data frame

Return

the randomly selected element

Parameters

T

The type of element in the data frame

df

the data frame

stream

the source of randomness


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

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

Return

the randomly selected row

Parameters

T

the type returned

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


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

Randomly selects from the data frame using the supplied cdf

Return

the randomly selected row

Parameters

T

the type returned

df

data frame to select from

cdf

the cumulative probability associated with each element of array

stream

the source of randomness