zipf¶
Description¶
Returns a Zipf-distributed integer, for N elements and characteristic exponent s. The computational cost of choosing a single random number is logarithmic in the argument N. More importantly, the memory cost is linear for N. Because of this, the argument N must be in the inclusive range [1, 16777215].
Return type¶
int64
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
zipf(s, n)
| Argument | Type | Optional | Repeatable | Restrictions | 
|---|---|---|---|---|
| s | int64 | no | no | constant | 
| n | int64 | no | no | constant | 
Examples¶
make_col zipf_kind:zipf(1, 20)
Generates a Zipf-distributed pseudo-random integer for N=20 elements and the characteristic exponent s = 1. The arguments (s and N) must be constants.