shuffled

fun <R> Iterable<R>.shuffled(randomGenerator: RandomGenerator): Iterable<R>

Fisher–Yates shuffle algorithm using a RandomGenerator. More information on Wikipedia.

Parameters

randomGenerator

the simulation random generator used to shuffle

Type Parameters

R

the element type