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,165 of 197,575
Downloads: 4,435

Daily

Ranking: 83,047 of 197,546
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,853,339,658bundler
81,442,171,972rake
141,322,346,880minitest
73641,776,434pry
1,12744,160,725pry-doc

Owners

#GravatarHandle
1iconscottlsteele