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,141 of 198,650
Downloads: 4,477

Daily

Ranking: 21,370 of 198,575
Downloads: 10

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,956,487,633bundler
81,466,417,310rake
141,345,592,494minitest
73650,170,605pry
1,13244,508,323pry-doc

Owners

#GravatarHandle
1iconscottlsteele