Ejemplo n.º 1
0
        public void TestToString()
        {
            double[] ps    = { 5, 0, 0, 0 };
            var      funct = new GaussianFunction(3, ps, 0);

            double[] x = { -1, 0, 1 };
            funct.Evaluate(x);
            Assert.AreEqual("[GaussianFunction:width=5.00,center=0.00,0.00,0.00]", funct.ToString());
        }
Ejemplo n.º 2
0
        public void TestEvaluate()
        {
            double[] ps    = { 5, 0, 0, 0 };
            var      funct = new GaussianFunction(3, ps, 0);

            double[] x = { -1, 0, 1 };
            double   y = funct.Evaluate(x);

            Assert.AreEqual(0.9607894391523232, y, AIFH.DefaultPrecision);
        }