DiscreteDistribution

class guppylang.std.qsystem.random.DiscreteDistribution[source]

A generic probability distribution over a set of the form {0, 1, …, N-1}.

Objects of this class should be generated using make_discrete_distribution().

sample(rng: RNG) int[source]

Return a sample value from the distribution, using the provided RNG.

sums: array[float, DISCRETE_N]