public class KISSRandom extends IntProvider
| Constructor and Description |
|---|
KISSRandom(int[] seed)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
getStateInternal()
Creates a snapshot of the RNG state.
|
int |
next() |
protected void |
setStateInternal(byte[] s)
Resets the RNG to the given
state. |
nextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextLongcheckIndex, checkStateSize, fillState, fillState, nextInt, nextLong, restoreState, saveState, toStringpublic KISSRandom(int[] seed)
seed - Seed.
If the length is larger than 4, only the first 4 elements will
be used; if smaller, the remaining elements will be automatically
set.protected byte[] getStateInternal()
getStateInternal in class BaseProviderprotected void setStateInternal(byte[] s)
state.setStateInternal in class BaseProviders - State (previously obtained by a call to
BaseProvider.getStateInternal()).BaseProvider.checkStateSize(byte[],int)public int next()
next in interface RandomIntSourcenext in class IntProviderCopyright © 2016 The Apache Software Foundation. All rights reserved.