Package org.apache.commons.rng.core
Class RandomProviderDefaultState
java.lang.Object
org.apache.commons.rng.core.RandomProviderDefaultState
- All Implemented Interfaces:
RandomProviderState
public class RandomProviderDefaultState extends java.lang.Object implements 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
-
Constructor Summary
Constructors Constructor Description RandomProviderDefaultState(byte[] state)Initializes an instance. -
Method Summary
Modifier and Type Method Description byte[]getState()
-
Constructor Details
-
RandomProviderDefaultState
public RandomProviderDefaultState(byte[] state)Initializes an instance. The contents of thestateargument 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 ofUniformRandomProviderneeds in order to reset its internal state.
-
-
Method Details
-
getState
public byte[] getState()- Returns:
- the internal state.
-