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: 140,952 of 192,062
Downloads: 4,336

Daily

Ranking: 130,063 of 192,034
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,334,693,029bundler
81,289,326,548rake
141,191,805,172minitest
73594,131,169pry
1,11441,966,096pry-doc

Owners

#GravatarHandle
1iconscottlsteele