sample
Randomly samples an element from the array.
Parameters
the stream to use for randomness
Randomly samples sampleSize elements from the array, returning a new array
Return
a new array containing the sample
Parameters
the size of the sample must be 1 or more
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.
Return
a new array containing the sample
Parameters
the size of the sample must be 1 or more
Randomly samples an element from the list.
Parameters
the stream to use for randomness
Randomly samples sampleSize elements from the list, returning a new list The elements in the list may repeat (sampling with replacement)
Return
a new array containing the sample
Parameters
the size of the sample must be 1 or more