Represents a discrete distribution which supports sampling value values(i) with probability proportional to unnormalizedProbabilities(i).
A distribution over integers.
A distribution over integers. The only required operations are sampling and expectation computation.
Standard binary heap, based on Chapter 6 of CLRS Algorithms 2nd Ed.
A max prioity queue of Ints with the additional property that it is possible to increase and look-up the priority of elements.
Various useful functions on collections.
Represents a discrete distribution which supports sampling value values(i) with probability proportional to unnormalizedProbabilities(i). Construction is O(n) time and sampling is O(1) time. Uses the alias method (see links at http://en.wikipedia.org/wiki/Alias_method).