27 #ifndef HYPERTABLE_DISCRETERANDOMGENERATORZIPF_H
28 #define HYPERTABLE_DISCRETERANDOMGENERATORZIPF_H
69 double pmf(uint64_t val);
86 #endif // HYPERTABLE_DISCRETERANDOMGENERATORZIPF_H
double m_s
The 's' of the zipfian algorithm.
Discrete Random Generator.
Compatibility Macros for C/C++.
double m_norm
Helper for calculating the probability in pmf()
Generate samples from Zipf distribution http://en.wikipedia.org/wiki/Zipf%27s_law.
bool m_initialized
true if m_norm was initialized
Generates samples from a discrete probability distribution in the range [0, max_val] by transforming ...
DiscreteRandomGeneratorZipf(double s=0.8)
Constructor; sets the "s" of the algorithm.
double pmf(uint64_t val)
Returns the probability of generating val + 1 from this distribution Uses val + 1 because dist...