public class ShufflerImpl
extends java.lang.Object
DefaultLongShuffler
and DefaultBigIntegerShuffler
).
Constructor and Description |
---|
ShufflerImpl(java.util.Random rnd) |
Modifier and Type | Method and Description |
---|---|
int[] |
getRandomPermutation(int length) |
java.math.BigInteger |
getShuffledIndex(java.math.BigInteger index,
java.math.BigInteger count)
Retrieves the BigInteger value corresponding to
index in a permutation with count elements. |
long |
getShuffledIndex(long index,
long count)
Retrieves the long value corresponding to
index in a permutation with count elements. |
ShufflerImpl |
withSeed(long seed) |
public ShufflerImpl(java.util.Random rnd)
rnd
- the random number generator used by this instance.public ShufflerImpl withSeed(long seed)
seed
- the seed of the random generator used by this instancepublic long getShuffledIndex(long index, long count)
index
in a permutation with count
elements.public java.math.BigInteger getShuffledIndex(java.math.BigInteger index, java.math.BigInteger count)
index
in a permutation with count
elements.public int[] getRandomPermutation(int length)
length
.