/// <summary> /// Take a sample from the distribution. /// </summary> public int Sample() { return(DiscreteDistribution.Sample(_rng, _dist)); }
/// <summary> /// Fill an array with samples from a distribution. /// </summary> /// <param name="buf">The array to fill with samples.</param> public void Sample(int[] buf) { DiscreteDistribution.Sample(_rng, _dist, buf); }
/// <summary> /// Fills the provided span with random samples from the distribution. /// </summary> /// <param name="span">The span to fill with samples.</param> public void Sample(Span <int> span) { DiscreteDistribution.Sample(_rng, _dist, span); }