Returns a random choice i from items of given positive integer weights[i] with probability weights[i] / sum(weights). This implements the fast loaded dice roller algorithm.
i
weights[i]
weights[i] / sum(weights)
https://arxiv.org/pdf/2003.03830.pdf
Generated using TypeDoc
Returns a random choice
i
from items of given positive integerweights[i]
with probabilityweights[i] / sum(weights)
. This implements the fast loaded dice roller algorithm.See
https://arxiv.org/pdf/2003.03830.pdf