public class DefaultLongShuffler extends java.lang.Object implements LongShuffler
LongShuffler based on ShufflerImpl.IDENTITY| Constructor and Description |
|---|
DefaultLongShuffler(long count)
Constructs a shuffler for indices in the range [0 ..
|
DefaultLongShuffler(long count,
java.util.Random rnd)
Constructs a shuffler for indices in the range [0 ..
|
| Modifier and Type | Method and Description |
|---|---|
long |
getShuffledIndex(long index)
Retrieves the value corresponding to
index in the permutation associated with this shuffler. |
DefaultLongShuffler |
withSeed(long seed) |
public DefaultLongShuffler(long count)
count - 1].count - the number of indices in the rangepublic DefaultLongShuffler(long count,
java.util.Random rnd)
count - 1], specifying the random number generator to be used.count - the number of indices in the rangernd - the random number generator to be usedpublic DefaultLongShuffler withSeed(long seed)
seed - the seed of the random generator used by this instancepublic long getShuffledIndex(long index)
LongShufflerindex in the permutation associated with this shuffler.getShuffledIndex in interface LongShuffler