RandomSubsetExtension<T> extension

on

Methods

randomSubset(int size, [Random? random]) Iterable<T>
Returns an iterable of the specified size consisting of random elements from this iterable. The optional parameter random specifies a random generator to be used for the random selection algorithm.