Mersenne Twister 64Engine.Seed Method
Definition
Namespace: Numerics.NET.Random.Engines
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Seed( | Initializes the generator with an array of keys (init_by_array64). |
| Seed( | Initializes the engine state from a seed sequence. |
| Seed( | Initializes the generator with a single seed (init_genrand64). |
Seed(ReadOnlySpan<UInt64>)
Initializes the generator with an array of keys (init_by_array64).
public void Seed(
ReadOnlySpan<ulong> initKey
)Parameters
- initKey ReadOnlySpan<UInt64>
- The initialization key array.
Remarks
This is the canonical MT19937-64 init-by-array initialization routine.
Mixes the key array into the state using the reference algorithm's two-phase mixing loops.
Exceptions
| Argument | Thrown when initKey is empty. |
Seed(SeedSequence)
Initializes the engine state from a seed sequence.
public void Seed(
SeedSequence seed
)Parameters
- seed SeedSequence
- The seed sequence providing entropy.
Implements
IRandomEngine.Seed(SeedSequence)Exceptions
| Argument | Thrown when seed is null. |
Seed(UInt64)
Initializes the generator with a single seed (init_genrand64).
Remarks
This is the canonical MT19937-64 single-seed initialization routine (init_genrand64).
Uses the standard multiplier 6364136223846793005 to fill the state array.