Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void GammaPDF(TDenseMtxVec X, Double A, Double B, TDenseMtxVec Res) | Gamma distribution PDF (vectorized). |
| 2 | void GammaPDF(TVec X, Double a, Double b, TVec Res) | Gamma probability density function (PDF) - vectorized version. |
| 3 | Double GammaPDF(Double x, Double a, Double b) | Gamma distribution probability density function (PDF). |
Overload 1: void GammaPDF(TDenseMtxVec X, Double A, Double B, TDenseMtxVec Res)
Gamma distribution PDF (vectorized).
| # | Name | Description |
|---|---|---|
| 1 | X | Defines distribution domain, real vector or matrix with real positive real values. |
| 2 | A | Defines distribution scale parameter. A must be a positive scalar. |
| 3 | B | Defines distribution shape parameter. B must be a positive scalar. |
| 4 | Res | After calculation stores the PDF calculated from X, a and b. Length and Complex properties of Res are adjusted automatically to match Length and Complex properties of X. |
Result: stored in self (calling object)
Overload 2: void GammaPDF(TVec X, Double a, Double b, TVec Res)
Gamma probability density function (PDF) - vectorized version.
| # | Name | Description |
|---|---|---|
| 1 | X | Distribution domain, vector of real positive values. |
| 2 | a | Defines distribution scale parameter. a must be a positive scalar. |
| 3 | b | Defines distribution shape parameter. b must be a positive scalar. |
| 4 | Res | Result vector that will store the computed PDF values. |
Result: stored in self (calling object)
Returns: Computes the Gamma probability density function (PDF) for vector of x values using the parameters a and b.
Calculates the Gamma distribution probability density function for each element in vector X, defined by the equation:
where Gamma denotes the Dew.Math.Units.Math387.Gamma function.
This is the vectorized version that operates on entire vectors for improved performance.
Overload 3: Double GammaPDF(Double x, Double a, Double b)
Gamma distribution probability density function (PDF).
| # | Name | Description |
|---|---|---|
| 1 | x | Distribution domain, real value >= 0. |
| 2 | a | Shape parameter, real value > 0. |
| 3 | b | Scale parameter, real value > 0. |
Returns: Double - the Gamma probability density function (PDF) at x for SHAPE parameter a and SCALE parameter b. Returns NAN when a <= 0 or b <= 0, returns 0 for x < 0, and +INF at x=0 when a < 1.
Computes the Gamma PDF with shape a and scale b:
PDF(x| a,b )= 1/(b^a Gamma (a)) x^(a-1)* exp (-x/b)
where Gamma is the Dew.Math.Units.Math387.Gamma function. Domain: x >= 0, a > 0, b > 0. Behaviour: NAN for a <= 0 or b <= 0; 0 for x < 0; at x=0 the density is 0 for a > 1, equals 1/b for a=1, and diverges (+INF) for a < 1. The exponential (a=1) and chi-squared (a=nu/2, b=2) distributions are special cases. A scalar form (this one) and a vectorized Dew.Math.TDenseMtxVec overload are provided.