From cbd7b2ff370613702726027412b91117ea82961a Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 12 Dec 2016 15:55:52 -0600 Subject: [PATCH] Add comments --- bench/zipf.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bench/zipf.go b/bench/zipf.go index dce592a05..d1dfc4628 100644 --- a/bench/zipf.go +++ b/bench/zipf.go @@ -12,7 +12,12 @@ import ( "time" ) -// ZipfSetBits sets bits randomly and deterministically based on a seed, according to the Zipf distribution +// ZipfSetBits sets random bits according to the Zipf-Mandelbrot distribution. +// This distribution accepts two parameters for both bitmaps and profiles: +// Exponent in (1, inf), default 1.001 - "sharpness" of the distribution. +// Ratio in (0, 1), default 0.25 - maximum variation of the distribution (the relative probability of the least likely ID to the most likely ID) +// +// It also uses PermutationGenerator to permute IDs randomly. type ZipfSetBits struct { HasClient BaseBitmapID int64