sampleWithoutReplacement

open fun sampleWithoutReplacement(x: DoubleArray, sampleSize: Int)

The array x is changed, such that the first sampleSize elements contain the sample. That is, x0, x1, ... , xsampleSize-1 is the random sample without replacement

Parameters

x

the array

sampleSize

the size to generate


open fun sampleWithoutReplacement(x: IntArray, sampleSize: Int)
open fun sampleWithoutReplacement(x: BooleanArray, sampleSize: Int)

The array x is changed, such that the first sampleSize elements contain the generated sample. That is, x0, x1, ... , xsampleSize-1 is the random sample without replacement

Parameters

x

the array

sampleSize

the size to generate


open fun <T> sampleWithoutReplacement(x: Array<T>, sampleSize: Int)

The array x is changed, such that the first sampleSize elements contain the generated sample. That is, x0, x1, ... , xsampleSize-1 is the randomly sampled values without replacement

Parameters

T

the type of the array

x

the array

sampleSize

the size to generate


open fun <T> sampleWithoutReplacement(x: MutableList<T>, sampleSize: Int)

The List x is changed, such that the first sampleSize elements contain the sampled values. That is, x.get(0), x.get(1), ... , x.get(sampleSize-1) is the random sample without replacement

Parameters

T

the type of the list

x

the list

sampleSize

the size to generate