Пример #1
0
        public void TestLaplace()
        {
            ProbabilityDistribution normal = new LaplaceDistribution(location: 0, diversity: 1);

            double[] tester = new double[100];
            for (var i = 0; i < 100; i++)
            {
                tester[i] = normal.NextDouble();
            }

            string jsonResult = JsonConvert.SerializeObject(tester);
        }
 Double Laplace(Double mu, Double b)
 {
     Distribution.Mu    = mu;
     Distribution.Alpha = b;
     return(Distribution.NextDouble());
 }
Пример #3
0
 double Laplace(double mu, double b)
 {
     ran.Mu    = mu;
     ran.Alpha = b;
     return(ran.NextDouble());
 }