Generate 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.
Generate 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.