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: 143,381 of 196,406
Downloads: 4,406

Daily

Ranking: 78,173 of 196,374
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,693,536,351bundler
81,401,623,903rake
141,286,881,604minitest
72629,130,869pry
1,12443,558,459pry-doc

Owners

#GravatarHandle
1iconscottlsteele