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