fromIterable

fun <E> fromIterable(iterable: Iterable<E>): RandomSelector<E>

Creates a RandomSelector from an Iterable, using uniform selection probabilities.

Return

A RandomSelector that selects elements uniformly at random.

Parameters

iterable

The iterable collection of elements.