generateWeightedRandomValuesInorder

Generates weighted random values for all input lines, preserving input order.

This complements weighted reservoir sampling, but instead of using a reservoir it simply iterates over the input lines generating the values. The weighted random values are generated with the same formula used by reservoirSampling.

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

Meta