Samples() публичный Метод

현 분포의 무작위 값을 열거합니다.
public Samples ( ) : IEnumerable
Результат IEnumerable
Пример #1
0
        public void SamplesDistributionTest()
        {
            var source    = Normal.Samples(MathTool.GetRandomFactory()(), 0.0, 1.0).AsParallel().Take(99999).ToList();
            var histogram = new Histogram(source, 50);

            DisplayDistribution("Normal", histogram);
        }
Пример #2
0
        public void StaticSamplesTest()
        {
            Normal.Samples(new Random(), 0.0, 1.0).Take(100).RunEach(x => x.Should().Not.Be(double.NaN));

            Assert.Throws <InvalidOperationException>(() => Normal.Samples(new Random(), 0.0, -1.0).First());
        }