Accord.Tests.Statistics.GaussianLinearTest.FunctionTest C# (CSharp) Method

FunctionTest() private method

private FunctionTest ( ) : void
return void
        public void FunctionTest()
        {
            double sigma = 0.1;
            var target = new Gaussian<Linear>(new Linear(0), sigma);
            double[] x = { 2.0, 3.1, 4.0 };
            double[] y = { 2.0, 3.1, 4.0 };
            double expected = 1;
            double actual;

            actual = target.Function(x, y);
            Assert.AreEqual(expected, actual);

            actual = target.Function(x, x);
            Assert.AreEqual(expected, actual);

            actual = target.Function(y, y);
            Assert.AreEqual(expected, actual);
        }