public class XoRoShiRo64Star extends IntProvider
float generation. This is slightly faster than the
all-purpose generator XoRoShiRo64StarStar.
This is a member of the Xor-Shift-Rotate family of generators. Memory footprint is 64 bits.
| Modifier and Type | Field and Description |
|---|---|
protected int |
state0
State 0 of the generator.
|
protected int |
state1
State 1 of the generator.
|
| Constructor and Description |
|---|
XoRoShiRo64Star(int[] seed)
Creates a new instance.
|
XoRoShiRo64Star(int seed0,
int seed1)
Creates a new instance using a 2 element seed.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
getStateInternal()
Creates a snapshot of the RNG state.
|
int |
next() |
protected int |
nextOutput()
Use the current state to compute the next output from the generator.
|
protected void |
setStateInternal(byte[] s)
Resets the RNG to the given
state. |
nextBoolean, nextBytes, nextBytes, nextDouble, nextInt, nextLong, resetCachedStatecheckIndex, checkStateSize, composeStateInternal, extendSeed, extendSeed, fillState, fillState, restoreState, saveState, splitStateInternal, toStringprotected int state0
protected int state1
public XoRoShiRo64Star(int[] 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. A seed containing all zeros will create a non-functional generator.public XoRoShiRo64Star(int seed0, int seed1)
seed0 - Initial seed element 0.seed1 - Initial seed element 1.protected int nextOutput()
next() before the current state is updated.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)public int next()
Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.