public class PcgMcgXshRs32 extends IntProvider
State size is 64 bits and the period is 262.
Constructor and Description |
---|
PcgMcgXshRs32(Long 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 . |
protected int |
transform(long x)
Transform the 64-bit state of the generator to a 32-bit output.
|
nextBoolean, nextBytes, nextBytes, nextDouble, nextInt, nextLong, resetCachedState
checkIndex, checkStateSize, composeStateInternal, extendSeed, extendSeed, fillState, fillState, restoreState, saveState, splitStateInternal, toString
public PcgMcgXshRs32(Long seed)
seed
- Initial seed.protected int transform(long x)
x
- State.public int next()
protected byte[] getStateInternal()
getStateInternal
in class IntProvider
protected void setStateInternal(byte[] s)
state
.setStateInternal
in class IntProvider
s
- State (previously obtained by a call to
BaseProvider.getStateInternal()
).BaseProvider.checkStateSize(byte[],int)
Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.