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
Functions
Link copied to clipboard
Permutes the array in place. The array is changed.
Link copied to clipboard
Randomly samples an element from the array.
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
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)