Re:Weighted/Biased Random Number Generation with JavaScript ...
by dllu on Monday April 22, 2013 @01:14PM
(#5590457)
For method 2, if you precompute the cumulative distribution function, you can do a binary search which is only O(log N) instead of O(N).
[ Parent
| on HN ]
There are no comments on this comment yet.