Philox 4x 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( | Directly sets the Philox key with counter initialized to zero. |
| Seed( | Initializes the engine state from a seed sequence. |
| Seed( | Directly sets the Philox key and counter. |
Seed(ReadOnlySpan<UInt32>)
Directly sets the Philox key with counter initialized to zero.
public void Seed(
ReadOnlySpan<uint> key
)Parameters
- key ReadOnlySpan<UInt32>
- The 64-bit key (2 × 32-bit words).
Remarks
This is an author-defined seeding routine for Philox4x32 that sets the key
and initializes the counter to zero. Generates the initial block after setting state.
Exceptions
| Argument | Thrown when key length is incorrect. |
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(ReadOnlySpan<UInt32>, ReadOnlySpan<UInt32>)
Directly sets the Philox key and counter.
public void Seed(
ReadOnlySpan<uint> key,
ReadOnlySpan<uint> counter
)Parameters
- key ReadOnlySpan<UInt32>
- The 64-bit key (2 × 32-bit words).
- counter ReadOnlySpan<UInt32>
- The 128-bit counter (4 × 32-bit words).
Remarks
This is the author-defined seeding routine for Philox4x32 that directly sets
the key and counter. Generates the initial block after setting state.
Exceptions
| Argument | Thrown when key or counter length is incorrect. |