Package-level declarations

Types

Link copied to clipboard
interface ParametersIfc

Represents a general mechanism for setting and getting the parameters of a function via an array of doubles

Link copied to clipboard
interface SampleIfc

Functions

Link copied to clipboard
fun <T> Array<T>.permute(streamNum: Int): Array<T>
fun <T> Array<T>.permute(stream: RNStreamIfc = KSLRandom.defaultRNStream()): Array<T>
fun BooleanArray.permute(stream: RNStreamIfc = KSLRandom.defaultRNStream()): BooleanArray
fun DoubleArray.permute(stream: RNStreamIfc = KSLRandom.defaultRNStream()): DoubleArray
fun IntArray.permute(streamNum: Int): IntArray
fun IntArray.permute(stream: RNStreamIfc = KSLRandom.defaultRNStream()): IntArray
fun <T> MutableList<T>.permute(streamNum: Int): MutableList<T>
fun <T> MutableList<T>.permute(stream: RNStreamIfc = KSLRandom.defaultRNStream()): MutableList<T>

Permutes the array in place. The array is changed.

Link copied to clipboard
fun <T> Array<T>.sample(stream: RNStreamIfc = KSLRandom.defaultRNStream()): T
fun BooleanArray.sample(stream: RNStreamIfc = KSLRandom.defaultRNStream()): Boolean
fun DoubleArray.sample(stream: RNStreamIfc = KSLRandom.defaultRNStream()): Double
fun IntArray.sample(stream: RNStreamIfc = KSLRandom.defaultRNStream()): Int

Randomly samples an element from the array.

fun <T> MutableList<T>.sample(stream: RNStreamIfc = KSLRandom.defaultRNStream()): T

Randomly samples an element from the list.

fun <T> Array<T>.sample(sampleSize: Int, stream: RNStreamIfc = KSLRandom.defaultRNStream()): MutableList<T>

Randomly samples sampleSize elements from the array, returning a new MutableList holding the same type. For now, caller can use toTypedArray() on the mutable list to get back an array at the call site.

fun BooleanArray.sample(sampleSize: Int, stream: RNStreamIfc = KSLRandom.defaultRNStream()): BooleanArray
fun DoubleArray.sample(sampleSize: Int, stream: RNStreamIfc = KSLRandom.defaultRNStream()): DoubleArray
fun IntArray.sample(sampleSize: Int, stream: RNStreamIfc = KSLRandom.defaultRNStream()): IntArray

Randomly samples sampleSize elements from the array, returning a new array

fun <T> MutableList<T>.sample(sampleSize: Int, stream: RNStreamIfc = KSLRandom.defaultRNStream()): MutableList<T>

Randomly samples sampleSize elements from the list, returning a new list The elements in the list may repeat (sampling with replacement)