Package org.apache.commons.rng.core
Class RandomProviderDefaultState
java.lang.Object
org.apache.commons.rng.core.RandomProviderDefaultState
- All Implemented Interfaces:
RandomProviderState
Wraps the internal state of a generator instance.
Its purpose is to store all the data needed to recover the same
state in order to restart a sequence where it left off.
External code should not try to modify the data contained in instances
of this class.
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
state
private final byte[] stateInternal state.
-
-
Constructor Details
-
RandomProviderDefaultState
public RandomProviderDefaultState(byte[] state) Initializes an instance. The contents of thestate
argument is unspecified, and is guaranteed to be valid only if it was generated by implementations provided by this library.- Parameters:
state
- Mapping of all the data which an implementation ofUniformRandomProvider
needs in order to reset its internal state.
-
-
Method Details
-
getState
public byte[] getState()Get the state.- Returns:
- the internal state.
-