Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double ZipfPDF(int x, double s, int N); | Zipf (finite/truncated) probability mass function (PMF). |
| 2 | void ZipfPDF(TMtxVecInt *X, double s, int N, TDenseMtxVec *Res); | Zipf distribution PDF (vectorized). |
Overload 1: double ZipfPDF(int x, double s, int N);
Zipf (finite/truncated) probability mass function (PMF).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | x | int | Function domain, positive integer on the closed interval [1,N]. |
| 2 | s | double | Exponent (shape) parameter, real positive value. |
| 3 | N | int | Number of elements (support upper bound), positive integer. |
Returns: the finite Zipf probability mass function (PMF) at x using parameters s and N. Returns NAN when s<=0, N<=0, or x outside [1,N].
Remarks:
Computes the finite (truncated) Zipf PMF over the rank support 1,...,N:
PMF(x| s,N)=(1/x^s)/H(N,s), H(N,s)=sum_(k=1)^N1/k^s
where is the generalized harmonic number. Domain: x in {1,...,N}, s>0, N>0; otherwise the result is NaN.
See Also: Probabilities::ZipfCDF, Probabilities::ZipfCDFInv
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler
Overload 2: void ZipfPDF(TMtxVecInt *X, double s, int N, TDenseMtxVec *Res);
Zipf distribution PDF (vectorized).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt * | Defines distribution domain, real vector or matrix with integer values on interval [1,Inf). |
| 2 | s | double | Distribution parameter, real positive value. |
| 3 | N | int | Distribution parameter, positive integer. |
| 4 | Res | TDenseMtxVec * | After calculation stores the PDF calculated from X,s and N. 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