RandomLongSource, RestorableUniformRandomProvider, UniformRandomProviderpublic class TwoCmres extends LongProvider
It is one of the many generators described by the author in the following article series:
| Constructor | Description |
|---|---|
TwoCmres(java.lang.Integer seed) |
Creates a new instance.
|
TwoCmres(java.lang.Integer seed,
int i,
int j) |
Creates a new instance.
|
| Modifier and Type | Method | 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. |
java.lang.String |
toString() |
checkIndex, checkStateSize, fillState, fillState, nextInt, nextLong, restoreState, saveStatenextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextLongpublic TwoCmres(java.lang.Integer seed)
seed - Seed.public TwoCmres(java.lang.Integer seed, int i, int j)
seed - Seed.i - Table entry for first subcycle generator.j - Table entry for second subcycle generator.java.lang.IllegalArgumentException - if i == j.java.lang.IndexOutOfBoundsException - if i < 0 or
i >= numberOfSubcycleGenerators().java.lang.IndexOutOfBoundsException - if j < 0 or
j >= numberOfSubcycleGenerators().public long next()
public java.lang.String toString()
toString in class BaseProviderpublic static int numberOfSubcycleGenerators()
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)Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.