sampleWithoutReplacement

fun sampleWithoutReplacement(x: DoubleArray, sampleSize: Int, streamNum: 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

streamNum

the stream number from the stream provider to use


fun sampleWithoutReplacement(x: DoubleArray, sampleSize: Int, rng: RNStreamIfc = defaultRNStream())

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

rng

the source of randomness


fun sampleWithoutReplacement(x: IntArray, sampleSize: Int, streamNum: Int)
fun sampleWithoutReplacement(x: BooleanArray, sampleSize: Int, streamNum: 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

streamNum

the stream number from the stream provider to use


fun sampleWithoutReplacement(x: IntArray, sampleSize: Int, rng: RNStreamIfc = defaultRNStream())
fun sampleWithoutReplacement(x: BooleanArray, sampleSize: Int, rng: RNStreamIfc = defaultRNStream())

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

rng

the source of randomness


fun <T> sampleWithoutReplacement(x: Array<T>, sampleSize: Int, streamNum: 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

streamNum

the stream number from the stream provider to use


fun <T> sampleWithoutReplacement(x: Array<T>, sampleSize: Int, stream: RNStreamIfc = defaultRNStream())

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

stream

the source of randomness


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

The List x is changed, such that the first sampleSize elements contain the generate. 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


fun <T> sampleWithoutReplacement(x: MutableList<T>, sampleSize: Int, stream: RNStreamIfc = defaultRNStream())

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

stream

the source of randomness