Public Member Functions | List of all members
ibis::discreteZipf Class Reference

Discrete Zipf distribution. More...

#include <twister.h>

Public Member Functions

 discreteZipf (ibis::uniformRandomNumber &ur, double a=2.0, unsigned long imax=ULONG_MAX)
 
unsigned long next ()
 
unsigned long operator() ()
 Return a discrete random number in the range of [0, imax].
 

Detailed Description

Discrete Zipf distribution.

The value returned follow the probability distribution (1+k)^(-a) where a >= 0, k >= 0. For a > 1, it uses the rejection-inversion algorithm of W. Hormann and G. Derflinger. For a between 0 and 1, it uses a simple rejection method.


The documentation for this class was generated from the following file:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive