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);
 }
Esempio n. 2
0
		public RayleighDistribution(double sigma, Generator generator)
			: base(generator)
		{
			this.normalDistribution1 = new NormalDistribution(0, 1, generator);
			this.normalDistribution2 = new NormalDistribution(0, 1, generator);
			this.Initialize(sigma);
		}
Esempio n. 3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ChiDistribution"/> class, using the specified
		///   <see cref="Generator"/> as underlying random number generator.
		/// </summary>
		/// <param name="N">Parameter of the distribution.</param>
		/// <param name="generator">A <see cref="Generator"/> object.</param>
		/// <exception cref="ArgumentNullException">
		/// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
		/// </exception>
		public ChiDistribution(int N, Generator generator)
			: base(generator)
		{
			this._normalDistribution = new NormalDistribution(0, 1, generator);
			Initialize(N);
		}
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LognormalDistribution"/> class, using the specified
 ///   <see cref="Generator"/> as underlying random number generator.
 /// </summary>
 /// <param name="mu">First parameter of the distribution.</param>
 /// <param name="sigma">Second parameter of the distribution.</param>
 /// <param name="generator">A <see cref="Generator"/> object.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
 /// </exception>
 public LognormalDistribution(double mu, double sigma, Generator generator)
     : base(generator)
 {
     normalDistribution = new NormalDistribution(0, 1, generator);
     Initialize(mu, sigma);
 }
Esempio n. 5
0
		/// <summary>
		/// Initializes a new instance of the <see cref="StudentsTDistribution"/> class, using the specified
		///   <see cref="Generator"/> as underlying random number generator.
		/// </summary>
		/// <param name="nu">Parameter of the distribution.</param>
		/// <param name="generator">A <see cref="Generator"/> object.</param>
		/// <exception cref="ArgumentNullException">
		/// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
		/// </exception>
		public StudentsTDistribution(double nu, Generator generator)
			: base(generator)
		{
			this.normalDistribution = new NormalDistribution(0, 1, generator);
			this.Initialize(nu);
		}
Esempio n. 6
0
		/// <summary>
		/// Initializes a new instance of the <see cref="LognormalDistribution"/> class, using the specified
		///   <see cref="Generator"/> as underlying random number generator.
		/// </summary>
		/// <param name="mu">First parameter of the distribution.</param>
		/// <param name="sigma">Second parameter of the distribution.</param>
		/// <param name="generator">A <see cref="Generator"/> object.</param>
		/// <exception cref="ArgumentNullException">
		/// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
		/// </exception>
		public LognormalDistribution(double mu, double sigma, Generator generator)
			: base(generator)
		{
			this.normalDistribution = new NormalDistribution(0, 1, generator);
			Initialize(mu, sigma);
		}
		public void TestNormalDistribution()
		{
			double[][] para = {
new double[]{1.5, 1.75, 0.319642937156856949396103, 0.1815866129623468194217694, 4.378493847165077251011736, 0.0589346516430693148362630}
      };
			for (int i = 0; i < para.Length; i++)
			{
				ContDistTester tester = new ContDistTester(para[i], delegate(double a, double b)
				{
					NormalDistribution ret = new NormalDistribution();
					ret.Mu = a;
					ret.Sigma = b;
					return ret;
				}
					);
				tester.Test(1E-14);
			}
		}
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChiDistribution"/> class, using the specified
 ///   <see cref="Generator"/> as underlying random number generator.
 /// </summary>
 /// <param name="N">Parameter of the distribution.</param>
 /// <param name="generator">A <see cref="Generator"/> object.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
 /// </exception>
 public ChiDistribution(int N, Generator generator)
     : base(generator)
 {
     _normalDistribution = new NormalDistribution(0, 1, generator);
     Initialize(N);
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StudentsTDistribution"/> class, using the specified
 ///   <see cref="Generator"/> as underlying random number generator.
 /// </summary>
 /// <param name="nu">Parameter of the distribution.</param>
 /// <param name="generator">A <see cref="Generator"/> object.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
 /// </exception>
 public StudentsTDistribution(double nu, Generator generator)
     : base(generator)
 {
     normalDistribution = new NormalDistribution(0, 1, generator);
     Initialize(nu);
 }
Esempio n. 10
0
		/// <summary>
        /// Initializes a new instance of the <see cref="ChiSquareDistribution"/> class, using the specified
        ///   <see cref="Generator"/> as underlying random number generator.
        /// </summary>
        /// <param name="generator">A <see cref="Generator"/> object.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
        /// </exception>
        public ChiSquareDistribution(Generator generator)
            : base(generator)
        {
            this.alpha = 1;
            this.normalDistribution = new NormalDistribution(generator);
            this.normalDistribution.Mu = 0.0;
            this.normalDistribution.Sigma = 1.0;
        }