Esempio n. 1
0
        void bench_binomial()
        {
            //Slow!!!
            var spec = BinomialSpec <int> .Define(10, .5);

            Benchmark(spec.Distribution(Random));
        }
Esempio n. 2
0
 /// <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);
Esempio n. 3
0
 public BinomialDist(IPolyrand random, BinomialSpec <T> spec)
     : base(random, spec)
 {
 }