void bench_binomial() { //Slow!!! var spec = BinomialSpec <int> .Define(10, .5); Benchmark(spec.Distribution(Random)); }
/// <summary> /// Constructs a Binomial distribution given a specification and random source /// </summary> /// <param name="spec">A specification that characterizes the distribution</param> /// <param name="random">A (uniform) random source</param> /// <typeparam name="T">The sample element type</typeparam> public static BinomialDist <T> Distribution <T>(this BinomialSpec <T> spec, IPolyrand random) where T : unmanaged => new BinomialDist <T>(random, spec);
public BinomialDist(IPolyrand random, BinomialSpec <T> spec) : base(random, spec) { }