Probabilities::MaxwellPDF Function

Overload List

#SignatureDescription
1double MaxwellPDF(double x, double a);Maxwell probability density function (PDF).
2void MaxwellPDF(TDenseMtxVec *X, double a, TDenseMtxVec *Res);Maxwell PDF (vectorized).

Overload 1: double MaxwellPDF(double x, double a);

Maxwell probability density function (PDF).

#NameTypeDescription
1xdoubleFunction domain, zero or positive real value.
2adoubleDistribution parameter, positive real value.

Returns: the Maxwell probability density function (PDF) for value x using the parameter a. a must be positive and x >= 0, otherwise the result is NAN.

Remarks:

The routine evaluates, for x >= 0,

PDF(x| a)=sqrt(2/(pi a)) x^2/a^2exp(-x^2/2a^2)

Note: this expression carries an extra factor of sqrt(a) relative to the standard normalized Maxwell density (which is sqrt(2/pi) x^2/a^3 exp(-x^2/2a^2)); consequently it integrates to sqrt(a) rather than 1 and is not the exact derivative of MaxwellCDF (which IS the standard normalized CDF with scale a). The relation MaxwellPDF(x,a) = sqrt(a) * d/dx MaxwellCDF(x,a) holds. Domain: x >= 0 and a > 0. For a <= 0 or x < 0 the result is NAN.

See Also: Probabilities::MaxwellCDF, Probabilities::MaxwellCDFInv
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler

Overload 2: void MaxwellPDF(TDenseMtxVec *X, double a, TDenseMtxVec *Res);

Maxwell PDF (vectorized).

#NameTypeDescription
1XTDenseMtxVec *Defines distribution domain, real vector or matrix with positive real values or zeros.
2adoubleDistribution parameter, positive real value.
3ResTDenseMtxVec *After calculation stores the PDF calculated from X and a. Length and Complex properties of Res are adjusted automatically to match Length and Complex properties of X.
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler