You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If records have weight configured, choose them randomly based on the weight. The perl implementation sorts the records by weight (descending), adds up the total weight and then generates a random number between 0 and then loops through the records until the accumulated weight is higher than the random number.
Stackoverflow suggests basically the same algorithm, though modifying the slice after each pick to avoid duplicates (the perl version tries doing that with brute-force).
The text was updated successfully, but these errors were encountered:
If records have weight configured, choose them randomly based on the weight. The perl implementation sorts the records by weight (descending), adds up the total weight and then generates a random number between 0 and then loops through the records until the accumulated weight is higher than the random number.
Stackoverflow suggests basically the same algorithm, though modifying the slice after each pick to avoid duplicates (the perl version tries doing that with brute-force).
The text was updated successfully, but these errors were encountered: