type Zipf … func (z *Zipf) h(x float64) float64 { … } func (z *Zipf) hinv(x float64) float64 { … } // NewZipf returns a [Zipf] variate generator. // The generator generates values k ∈ [0, imax] // such that P(k) is proportional to (v + k) ** (-s). // Requirements: s > 1 and v >= 1. func NewZipf(r *Rand, s float64, v float64, imax uint64) *Zipf { … } // Uint64 returns a value drawn from the [Zipf] distribution described // by the [Zipf] object. func (z *Zipf) Uint64() uint64 { … }