コード例 #1
0
ファイル: ErlangDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
        /// Initializes a new instance of the <see cref="ErlangDistribution"/> 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 ErlangDistribution(Generator generator)
            : base(generator)
        {
            this.alpha = 1;
            this.lambda = 1.0;
            this.UpdateHelpers();
        }
コード例 #2
0
ファイル: ChiDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <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);
		}
コード例 #3
0
ファイル: PowerDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Initializes a new instance of the <see cref="PowerDistribution"/> 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 PowerDistribution(Generator generator)
			: this(1, 1, generator)
		{
		}
コード例 #4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="GeometricDistribution"/> 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 GeometricDistribution(Generator generator)
			: this(0.5, generator)
		{
		}
コード例 #5
0
ファイル: RayleighDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Initializes a new instance of the <see cref="RayleighDistribution"/> 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 RayleighDistribution(Generator generator)
			: this(1, generator)
		{
		}
コード例 #6
0
		public StudentTDistribution(double nu, Generator generator)
			: base(nu, generator)
		{
		}
コード例 #7
0
		public DiscreteUniformDistribution(Generator gen)
			: this(0, 1, gen)
		{
		}
コード例 #8
0
ファイル: BinomialDistribution.cs プロジェクト: Altaxo/Altaxo
		public BinomialDistribution(int num, double prob, Generator ran)
			: base(ran)
		{
			Initialize(prob, num);
		}
コード例 #9
0
ファイル: BinomialDistribution.cs プロジェクト: Altaxo/Altaxo
		public BinomialDistribution(Generator generator)
			: this(1, 0.5, generator)
		{
		}
コード例 #10
0
ファイル: CauchyDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Initializes a new instance of the <see cref="CauchyDistribution"/> class, using the specified
		///   <see cref="Generator"/> as underlying random number generator.
		/// </summary>
		/// <param name="alpha">First parameter of the distribution.</param>
		/// <param name="gamma">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 CauchyDistribution(double alpha, double gamma, Generator generator)
			: base(generator)
		{
			Initialize(alpha, gamma);
		}
コード例 #11
0
ファイル: ParetoDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Initializes a new instance of the <see cref="ParetoDistribution"/> 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 ParetoDistribution(Generator generator)
			: this(1, 1, generator)
		{
		}
コード例 #12
0
ファイル: CauchyDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Initializes a new instance of the <see cref="CauchyDistribution"/> 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 CauchyDistribution(Generator generator)
			: this(1, 1, generator)
		{
		}
コード例 #13
0
ファイル: ErlangDistribution.cs プロジェクト: Altaxo/Altaxo
		public ErlangDistribution(int order, double lambda, Generator ran)
			: base(ran)
		{
			Initialize(order, lambda);
		}
コード例 #14
0
ファイル: ErlangDistribution.cs プロジェクト: Altaxo/Altaxo
		public ErlangDistribution(Generator gen)
			: this(1, 1, gen)
		{
		}
コード例 #15
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);
		}
コード例 #16
0
ファイル: LaplaceDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Initializes a new instance of the <see cref="LaplaceDistribution"/> 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 LaplaceDistribution(Generator generator)
			: this(0, 1, generator)
		{
		}
コード例 #17
0
		/// <summary>
		/// Initializes a new instance of the <see cref="StudentTDistribution"/> 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 StudentTDistribution(Generator generator)
			: base(generator)
		{
		}
コード例 #18
0
ファイル: LaplaceDistribution.cs プロジェクト: Altaxo/Altaxo
		public LaplaceDistribution(double mu, double alpha, Generator generator)
			: base(generator)
		{
			Initialize(mu, alpha);
		}
コード例 #19
0
		/// <summary>
		/// Initializes a new instance of the <see cref="StudentsTDistribution"/> class, using a
		///   <see cref="StandardGenerator"/> as underlying random number generator.
		/// </summary>
		public StudentsTDistribution(Generator generator)
			: this(1, generator)
		{
		}
コード例 #20
0
ファイル: Distribution.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Initializes a new instance of the <see cref="Distribution"/> 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>
		protected Distribution(Generator generator)
		{
			if (generator == null)
			{
				string message = string.Format(null, ExceptionMessages.ArgumentNull, "generator");
				throw new ArgumentNullException("generator", message);
			}
			this.generator = generator;
		}
コード例 #21
0
		/// <summary>
		/// Initializes a new instance of the <see cref="DiscreteUniformDistribution"/> class, using the specified
		///   <see cref="Generator"/> as underlying random number generator.
		/// </summary>
		/// <param name="lower">Lower boundary of the distributed values.</param>
		/// <param name="upper">Upper boundary of the distributed values.</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 DiscreteUniformDistribution(int lower, int upper, Generator generator)
			: base(generator)
		{
			Initialize(lower, upper);
		}
コード例 #22
0
		/// <summary>
		/// Creates a new instance of this distribution with given parameters (alpha, beta, scale, location) and the provided random number generator.
		/// </summary>
		/// <param name="alpha">Distribution parameter alpha (broadness exponent).</param>
		/// <param name="gamma">Distribution parameter gamma (skew).</param>
		/// <param name="scale">Scaling parameter (broadness of the distribution).</param>
		/// <param name="location">Location of the distribution.</param>
		/// <param name="generator">Random number generator to be used with this distribution.</param>
		public StableDistributionFeller(double alpha, double gamma, double scale, double location, Generator generator)
			: this(alpha, gamma, GetAgaFromAlphaGamma(alpha, gamma), scale, location, generator)
		{
		}
コード例 #23
0
		public GeometricDistribution(double probability, Generator generator)
			: base(generator)
		{
			Initialize(probability);
		}
コード例 #24
0
		/// <summary>
		/// Creates a new instance of this distribution with given parameters (alpha, beta, abe, scale, location) and the provided random number generator.
		/// </summary>
		/// <param name="alpha">Distribution parameter alpha (broadness exponent).</param>
		/// <param name="gamma">Distribution parameter gamma (skew).</param>
		/// <param name="aga">Parameter to specify gamma with higher accuracy around it's limit(s). For an explanation how aga is defined, see <see cref="GetAgaFromAlphaGamma"/>.</param>
		/// <param name="scale">Scaling parameter (broadness of the distribution).</param>
		/// <param name="location">Location of the distribution.</param>
		/// <param name="generator">Random number generator to be used with this distribution.</param>
		public StableDistributionFeller(double alpha, double gamma, double aga, double scale, double location, Generator generator)
			: base(generator)
		{
			Initialize(alpha, gamma, aga, scale, location);
		}
コード例 #25
0
ファイル: RayleighDistribution.cs プロジェクト: Altaxo/Altaxo
		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);
		}
コード例 #26
0
		/// <summary>
		/// Creates a new instance of this distribution with default parameters (alpha=1, beta=0).
		/// </summary>
		/// <param name="generator">Random number generator to be used with this distribution.</param>
		public StableDistributionFeller(Generator generator)
			: this(1, 0, 1, 1, 0, generator)
		{
		}
コード例 #27
0
ファイル: ChiDistribution.cs プロジェクト: Altaxo/Altaxo
		/// <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="generator">A <see cref="Generator"/> object.</param>
		/// <exception cref="ArgumentNullException">
		/// <paramref name="generator"/> is NULL (<see langword="Nothing"/> in Visual Basic).
		/// </exception>
		public ChiDistribution(Generator generator)
			: this(1, generator)
		{
		}
コード例 #28
0
		/// <summary>Initializes a new instance of the <see cref="ContinuousDistribution"/> class.</summary>
		/// <param name="generator">The random number generator used.</param>
		public ContinuousDistribution(Generator generator)
			: base(generator)
		{
		}
コード例 #29
0
ファイル: PowerDistribution.cs プロジェクト: Altaxo/Altaxo
		public PowerDistribution(double alpha, double beta, Generator generator)
			: base(generator)
		{
			Initialize(alpha, beta);
		}
コード例 #30
0
		public ContinuousUniformDistribution(double lower, double upper, Generator generator)
			: base(generator)
		{
			Initialize(lower, upper);
		}