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))); } }
public ref T First <T>() where T : unmanaged => ref As.generic <T>(ref Bytes[0]);