Zipf random number distribution. More...
Functions | |
struct spdk_zipf * | spdk_zipf_create (uint64_t range, double theta, uint32_t seed) |
Create a zipf random number generator. | |
void | spdk_zipf_free (struct spdk_zipf **zipfp) |
Free a zipf generator and set the pointer to NULL. | |
uint64_t | spdk_zipf_generate (struct spdk_zipf *zipf) |
Generate a value from the zipf generator. | |
Zipf random number distribution.
struct spdk_zipf * spdk_zipf_create | ( | uint64_t | range, |
double | theta, | ||
uint32_t | seed ) |
Create a zipf random number generator.
Numbers from [0, range) will be returned by the generator when calling spdk_zipf_generate.
range | Range of values for the zipf distribution. |
theta | Theta distribution parameter. |
seed | Seed value for the random number generator. |
void spdk_zipf_free | ( | struct spdk_zipf ** | zipfp | ) |
Free a zipf generator and set the pointer to NULL.
zipfp | Zipf generator to free. |
uint64_t spdk_zipf_generate | ( | struct spdk_zipf * | zipf | ) |
Generate a value from the zipf generator.
zipf | Zipf generator to generate the value from. |