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: 139,549 of 188,339
Downloads: 4,278

Daily

Ranking: 115,350 of 188,315
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,087,820,008bundler
101,191,537,815rake
141,115,266,772minitest
74565,610,210pry
1,09540,640,796pry-doc

Owners

#GravatarHandle
1iconscottlsteele