RandomLongSource, RestorableUniformRandomProvider, UniformRandomProviderpublic class XorShift1024Star extends LongProvider
| Constructor | Description |
|---|---|
XorShift1024Star(long[] seed) |
Creates a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected byte[] |
getStateInternal() |
Creates a snapshot of the RNG state.
|
long |
next() |
|
protected void |
setStateInternal(byte[] s) |
Resets the RNG to the given
state. |
checkIndex, checkStateSize, fillState, fillState, nextInt, nextLong, restoreState, saveState, toStringnextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextLongpublic XorShift1024Star(long[] seed)
seed - Initial seed.
If the length is larger than 16, only the first 16 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 long next()
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.