zipf(s: const int64, n: const int64) -> int64

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].

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

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.