public class ScrambledZipfianGenerator extends Random
| Modifier and Type | Field and Description |
|---|---|
static long |
FNV_offset_basis_64 |
static long |
FNV_prime_64 |
static long |
ITEM_COUNT |
static double |
USED_ZIPFIAN_CONSTANT |
static double |
ZETAN |
| Constructor and Description |
|---|
ScrambledZipfianGenerator(long _items)
Create a zipfian generator for the specified number of items.
|
ScrambledZipfianGenerator(long _min,
long _max)
Create a zipfian generator for items between min and max.
|
ScrambledZipfianGenerator(long min,
long max,
double _zipfianconstant)
Create a zipfian generator for items between min and max (inclusive) for
the specified zipfian constant.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
FNVhash64(long val)
64 bit FNV hash.
|
static void |
main(String[] args) |
int |
nextInt()
Return the next int in the sequence.
|
long |
nextLong()
Return the next long in the sequence.
|
public static final double ZETAN
public static final double USED_ZIPFIAN_CONSTANT
public static final long ITEM_COUNT
public static final long FNV_offset_basis_64
public static final long FNV_prime_64
public ScrambledZipfianGenerator(long _items)
_items - The number of items in the distribution.public ScrambledZipfianGenerator(long _min,
long _max)
_min - The smallest integer to generate in the sequence._max - The largest integer to generate in the sequence.public ScrambledZipfianGenerator(long min,
long max,
double _zipfianconstant)
min - The smallest integer to generate in the sequence.max - The largest integer to generate in the sequence._zipfianconstant - The zipfian constant to use.public int nextInt()
public long nextLong()
public static void main(String[] args)
public static long FNVhash64(long val)
val - The value to hash.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.