An open API service providing repository metadata for many open source software ecosystems.

GitHub topics: non-replacement-weighted-sampling

ori88c/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, making it suitable for performance-demanding applications where the set of items is large.

Language: TypeScript - Size: 72.3 KB - Last synced at: 16 days ago - Pushed at: 8 months ago - Stars: 0 - Forks: 0