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); }
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()); }