public class TwoCmres extends LongProvider
It is one of the many generators described by the author in the following article series:
| Constructor and Description |
|---|
TwoCmres(Integer seed)
Creates a new instance.
|
TwoCmres(Integer seed,
int i,
int j)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
getStateInternal()
Creates a snapshot of the RNG state.
|
long |
next() |
static int |
numberOfSubcycleGenerators() |
protected void |
setStateInternal(byte[] s)
Resets the RNG to the given
state. |
String |
toString() |
nextBoolean, nextInt, nextLong, resetCachedStatecheckIndex, checkStateSize, composeStateInternal, extendSeed, extendSeed, fillState, fillState, restoreState, saveState, splitStateInternalpublic TwoCmres(Integer seed, int i, int j)
seed - Seed.i - Table entry for first subcycle generator.j - Table entry for second subcycle generator.IllegalArgumentException - if i == j.IndexOutOfBoundsException - if i < 0 or
i >= numberOfSubcycleGenerators().IndexOutOfBoundsException - if j < 0 or
j >= numberOfSubcycleGenerators().public long next()
public String toString()
toString in class BaseProviderpublic static int numberOfSubcycleGenerators()
protected byte[] getStateInternal()
getStateInternal in class LongProviderprotected void setStateInternal(byte[] s)
state.setStateInternal in class LongProviders - State (previously obtained by a call to
BaseProvider.getStateInternal()).BaseProvider.checkStateSize(byte[],int)Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.