Click or drag to resize

GammaDistribution Class

Generates Gamma distributed random numbers.
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.ProbabilityDistribution
    Altaxo.Calc.ProbabilityContinuousDistribution
      Altaxo.Calc.ProbabilityGammaDistribution

Namespace: Altaxo.Calc.Probability
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public class GammaDistribution : ContinuousDistribution

The GammaDistribution type exposes the following members.

Constructors
 NameDescription
Public methodGammaDistribution Initializes a new instance of the GammaDistribution class, using a StandardGenerator as underlying random number generator.
Public methodGammaDistribution(Generator) Initializes a new instance of the GammaDistribution class, using the specified Generator as underlying random number generator.
Public methodGammaDistribution(Double, Double) Initializes a new instance of the GammaDistribution class.
Public methodGammaDistribution(Double, Double, Generator) Initializes a new instance of the GammaDistribution class.
Top
Properties
 NameDescription
Public propertyAlpha Gets or sets the parameter alpha which is used for generation of Gamma distributed random numbers.
Public propertyCanReset Gets a value indicating whether the random number distribution can be reset so that it produces the same random number sequence again.
(Inherited from Distribution)
Public propertyGenerator Gets or sets a Generator object that can be used as the underlying random number generator.
(Inherited from Distribution)
Public propertyLocation Gets or sets the location parameter.
Public propertyMaximum Gets the maximum possible value of distributed random numbers.
(Overrides DistributionMaximum)
Public propertyMean Gets the mean of distributed random numbers.
(Overrides DistributionMean)
Public propertyMedian Gets the median of distributed random numbers.
(Overrides DistributionMedian)
Public propertyMinimum Gets the minimum possible value of distributed random numbers.
(Overrides DistributionMinimum)
Public propertyMode Gets the mode of distributed random numbers.
(Overrides DistributionMode)
Public propertyOrder Gets the order (shape) parameter of the distribution.
Public propertyTheta Gets or sets the parameter theta which is used for generation of Gamma distributed random numbers.
Public propertyVariance Gets the variance of distributed random numbers.
(Overrides DistributionVariance)
Top
Methods
 NameDescription
Public methodCDF(Double)Calculates the cumulative distribution function.
(Overrides ContinuousDistributionCDF(Double))
Public methodStatic memberCDF(Double, Double, Double) Computes the cumulative distribution function (CDF) for a Gamma distribution with the given parameters.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitialize Initializes this instance with the specified distribution parameters.
Public methodIsValidAlpha Determines whether the specified value is valid for parameter Alpha.
Public methodIsValidTheta Determines whether the specified value is valid for parameter Theta.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodNextDouble Returns a distributed floating-point random number.
(Overrides DistributionNextDouble)
Public methodPDF(Double)Calculates the probability density function.
(Overrides ContinuousDistributionPDF(Double))
Public methodStatic memberPDF(Double, Double, Double) Computes the probability density function (PDF) for a Gamma distribution with the given parameters.
Public methodQuantile(Double)Calculates the quantile of the distribution function.
(Overrides ContinuousDistributionQuantile(Double))
Public methodStatic memberQuantile(Double, Double, Double) Computes the quantile (inverse CDF) for a Gamma distribution with the given parameters.
Public methodReset Resets the random number distribution so that it produces the same random number sequence again.
(Inherited from Distribution)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Protected field_invTheta 
Protected fieldalgorithmGD 
Protected fieldalpha 
Protected fieldb 
Protected fieldc 
Protected fieldd 
Protected fieldexponentialDistribution 
Protected fieldgenerator Stores a Generator object that can be used as the underlying random number generator.
(Inherited from Distribution)
Protected fieldnormalDistribution 
Protected fieldq0 
Protected fieldr 
Protected fields 
Protected fields2 
Protected fieldscale 
Protected fieldsi 
Protected fieldtheta 
Top
Remarks
C#
Return Gamma distributed random deviates according to:

                     a-1  -bx
               b (bx)    e
 p   (x) dx = ---------------- dx   for x > 0
  a,b             Gamma(a)

            =  0                    otherwise
                            // 
The arguments must satisfy the conditions:
a > 0   (positive)
b != 0  (non-zero)

References:

For parameter a >= 1 corresponds to algorithm GD in:
J. H. Ahrens and U. Dieter, Generating Gamma Variates by a
Modified Rejection Technique, Comm. ACM, 25, 1, 47-54 (1982).
For parameter 0 < a < 1 corresponds to algorithm GS in:
J. H. Ahrens and U. Dieter, Computer Methods for Sampling
from Gamma, Beta, Poisson and Binomial Distributions,
Computing, 12, 223-246 (1974).
See Also