예제 #1
0
        public void ValidateDensity(double location, double scale, double x)
        {
            var    n        = new Laplace(location, scale);
            double expected = Math.Exp(-Math.Abs(x - location) / scale) / (2.0 * scale);

            Assert.AreEqual(expected, n.Density(x));
            Assert.AreEqual(expected, Laplace.PDF(location, scale, x));
        }