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 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.
-
-
-
Constructor Detail
-
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 Detail
-
getState
public byte[] getState()
Get the state.- Returns:
- the internal state.
-
-