Esempio n. 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)));
            }
        }
Esempio n. 2
0
File: ZMM.cs Progetto: 0xCM/arrows
 public ref T First <T>()
     where T : unmanaged
 => ref As.generic <T>(ref Bytes[0]);