Samples a value from the discrete distribution using a custom random generator. Complexity: O(log n) where n is the number of weights.
See Implementation
Samples a value from the discrete distribution using a custom random generator. Complexity: O(log n) where n is the number of weights.