RandomIntSource, RestorableUniformRandomProvider, UniformRandomProviderpublic class PcgXshRs32 extends IntProvider
State size is 128 bits and the period is 264.
| Constructor | Description |
|---|---|
PcgXshRs32(long[] seed) |
Creates a new instance.
|
| Modifier and Type | Method | 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. |
protected int |
transform(long x) |
Transform the 64-bit state of the generator to a 32-bit output.
|
checkIndex, checkStateSize, composeStateInternal, fillState, fillState, nextInt, nextLong, restoreState, saveState, splitStateInternal, toStringnextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextLong, resetCachedStatepublic PcgXshRs32(long[] seed)
seed - Initial seed.
If the length is larger than 2, only the first 2 elements will
be used; if smaller, the remaining elements will be automatically set.protected int transform(long x)
x - State.public int next()
protected byte[] getStateInternal()
getStateInternal in class IntProviderprotected void setStateInternal(byte[] s)
state.setStateInternal in class IntProviders - State (previously obtained by a call to
BaseProvider.getStateInternal()).BaseProvider.checkStateSize(byte[],int)Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.