public GammaDistribution(double alpha, double theta, Generator ran) : base(ran) { normalDistribution = new NormalDistribution(0.0, 1.0, ran); exponentialDistribution = new ExponentialDistribution(1.0, ran); // std. exponential Initialize(alpha, theta); }
public GammaDistribution (double order, double loc, RandomGenerator ran) // original: NormalDistribution(0.0,1.0,ran), // std. normal { normalDistribution = new NormalDistribution(0.0,1.0,ran); exponentialDistribution = new ExponentialDistribution(1.0,ran); // std. exponential Initialize(order,loc); }
/// <summary>Initializes a new instance of the <see cref="StableDistributionBase"/> class.</summary> /// <param name="generator">The random number generator used.</param> protected StableDistributionBase(Generator generator) : base(generator) { _expDist = new ExponentialDistribution(generator); _contDist = new ContinuousUniformDistribution(generator); }
public void TestExponentialDistribution() { double[][] para = { new double[]{3.5, 0, 0.08219487784336597926834829, 2.625000000000000000000000, 0.8559235067297117124100639, 0.1750000000000000000000000} }; for (int i = 0; i < para.Length; i++) { ContDistTester tester = new ContDistTester(para[i], delegate(double a, double b) { ExponentialDistribution ret = new ExponentialDistribution(); ret.Lambda = a; return ret; } ); tester.Test(1E-14); } }