randomizeLinesViaShuffle

Randomize all the lines in files or standard input using a shuffling algorithm.

All lines in files and/or standard input are read in and written out in random order. This routine uses array shuffling, which is faster than sorting. It is a good alternative to randomizeLinesViaSort when doing unweighted randomization.

Input data size is limited by available memory. Disk oriented techniques are needed when data sizes are larger. For example, generating random values line-by-line (ala --gen-random-inorder) and sorting with a disk-backed sort program like GNU sort.

This routine does not support random value printing or compatibility-mode.

void
randomizeLinesViaShuffle
(
OutputRange
)
(,
auto ref OutputRange outputStream
)
if (
isOutputRange!(OutputRange, char)
)

Meta