コード例 #1
0
 /// <summary>
 /// Take a sample from the distribution.
 /// </summary>
 public int Sample()
 {
     return(DiscreteDistribution.Sample(_rng, _dist));
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 /// <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);
 }