Generate samples of elements: arrays of between minSize and maxSize
of its elements.
With replacement (the default) each element of the result is chosen
independently from the whole list, so the same value can appear any
number of times, and the size is bounded only by maxSize. With
replacement: false each element of the list is used at most once, in
the order drawn, so the size is capped at the number of elements. A
minSize that cannot be met throws. Shrinks toward fewer elements, taken
from earlier in the list.
To draw a single element, use sampledFrom; to reorder the whole
list, use permutations; to pick a subset while preserving the
original order, use subsequences.
Generate samples of
elements: arrays of betweenminSizeandmaxSizeof its elements.With replacement (the default) each element of the result is chosen independently from the whole list, so the same value can appear any number of times, and the size is bounded only by
maxSize. Withreplacement: falseeach element of the list is used at most once, in the order drawn, so the size is capped at the number of elements. AminSizethat cannot be met throws. Shrinks toward fewer elements, taken from earlier in the list.To draw a single element, use sampledFrom; to reorder the whole list, use permutations; to pick a subset while preserving the original order, use subsequences.