Pcg 32Engine.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 engine state from a seed sequence. |
| Seed( | Directly sets the PCG32 state and stream. |
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, UInt64)
Directly sets the PCG32 state and stream.
public void Seed(
ulong state,
ulong stream
)Parameters
Remarks
This is the canonical PCG seeding routine that sets state + stream directly. The internal increment is derived as: inc = (stream << 1) | 1 (must be odd).
Uses the standard PCG initialization sequence: set inc, set state=0, advance once, add state parameter, advance once more to thoroughly mix.