예제 #1
0
        public static IEnumerable <T> SampleBeta <T>(this IPolyrand random, T trueCount, T falseCount)
            where T : struct
        {
            var dist = new Dist.Beta(convert <T, double>(trueCount), convert <T, double>(falseCount));

            while (true)
            {
                yield return(As.generic <T>(dist.Sample(random)));
            }
        }
예제 #2
0
파일: ZMM.cs 프로젝트: 0xCM/arrows
 public ref T First <T>()
     where T : unmanaged
 => ref As.generic <T>(ref Bytes[0]);