RandomLongSource
, RestorableUniformRandomProvider
, UniformRandomProvider
public class DotyHumphreySmallFastCounting64 extends LongProvider
The state size is 256-bits; the period is a minimum of 264 and an average of approximately 2255.
Constructor | Description |
---|---|
DotyHumphreySmallFastCounting64(long[] seed) |
Creates an instance with the given seed.
|
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, composeStateInternal, fillState, fillState, nextInt, nextLong, restoreState, saveState, splitStateInternal, toString
nextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextLong, resetCachedState
public DotyHumphreySmallFastCounting64(long[] seed)
seed
- Initial seed.
If the length is larger than 3, only the first 3 elements will
be used; if smaller, the remaining elements will be automatically set.public final long next()
protected byte[] getStateInternal()
getStateInternal
in class LongProvider
protected void setStateInternal(byte[] s)
state
.setStateInternal
in class LongProvider
s
- State (previously obtained by a call to
BaseProvider.getStateInternal()
).BaseProvider.checkStateSize(byte[],int)
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.