Categories: None [Edit]

discrete_distribution

https://rubygems.org/gems/discrete_distribution
https://github.com/scooter-dangle/discrete_distribution
Fork of aliastable by Paul J Sanchez. If a categorical distribution has k distinct values, traditional approaches will require O(k) work to pick an outcome with the correct probabilities. This algorithm uses conditional probability to construct a table which will yield outcomes with the correct probabilities, but in O(1) time.

Total

Ranking: 144,167 of 197,744
Downloads: 4,438

Daily

Ranking: 41,879 of 197,724
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,863,547,421bundler
81,444,561,272rake
141,324,561,847minitest
73642,722,902pry
1,12744,195,035pry-doc

Owners

#GravatarHandle
1iconscottlsteele