Accord.Tests.Statistics.GammaDistributionTest.GammaDistributionConstructorTest C# (CSharp) Method

GammaDistributionConstructorTest() private method

private GammaDistributionConstructorTest ( ) : void
return void
        public void GammaDistributionConstructorTest()
        {
            double shape = 0.4;
            double scale = 4.2;

            double[] expected = 
            {
                double.NegativeInfinity, 0.987114, 0.635929, 0.486871, 0.400046,
                0.341683, 0.299071, 0.266236, 0.239956, 0.218323, 0.200126
            };

            GammaDistribution target = new GammaDistribution(scale, shape);

            Assert.AreEqual(shape, target.Shape);
            Assert.AreEqual(scale, target.Scale);

            Assert.AreEqual(shape * scale, target.Mean);
            Assert.AreEqual(shape * scale * scale, target.Variance);
        }