incrementalRandomShuffle

Like randomShuffle, but returns results incrementally (still copies the input, but calls gen only as needed). Like randomCover, but much faster (O(n) instead of O(n^2), though less space-efficient.

  1. auto incrementalRandomShuffle(Range range, RandomGen gen)
    incrementalRandomShuffle
    (
    Range
    RandomGen
    )
    (
    Range range
    ,
    ref RandomGen gen
    )
    if (
    isInputRange!Range &&
    isUniformRNG!RandomGen
    )
  2. auto incrementalRandomShuffle(Range range)

Meta