public void ValidateDensityLn(double[] x) { var d = new Dirichlet(new[] { 0.1, 0.3, 0.5, 0.8 }); AssertHelpers.AlmostEqualRelative(d.DensityLn(x), Math.Log(d.Density(x)), 12); }
public void ValidateDensity(double[] x, double res) { var d = new Dirichlet(new[] { 0.1, 0.3, 0.5, 0.8 }); AssertHelpers.AlmostEqualRelative(res, d.Density(x), 12); }