non-replacement-weighted-random-item-sampler

A weighted random item sampler (selector), where the probability of selecting an item is proportional to its weight, and every item is sampled exactly once (without repetition or replacement). The sampling method utilizes a binary-search optimization, mak

Browse on unpkg