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