예제 #1
0
 public override IEnumerable <T> Sample()
 {
     while (true)
     {
         var success = math.lt(Polyrand.Next <double>(), Spec.Success) ? One : Zero;
         yield return(success);
     }
 }
예제 #2
0
 public override IEnumerable <T> Sample()
 => Polyrand.SampleBinomial(Spec.Trials, Spec.Success);