Philox4x64Engine.Seed Method

Definition

Namespace: Numerics.NET.Random.Engines
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0

Overload List

Seed(ReadOnlySpan<UInt64>) Directly sets the Philox key with counter initialized to zero.
Seed(SeedSequence) Initializes the engine state from a seed sequence.
Seed(ReadOnlySpan<UInt64>, ReadOnlySpan<UInt64>) Directly sets the Philox key and counter.

Seed(ReadOnlySpan<UInt64>)

Directly sets the Philox key with counter initialized to zero.
C#
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

ArgumentExceptionThrown when key length is incorrect.

Seed(SeedSequence)

Initializes the engine state from a seed sequence.
C#
public void Seed(
	SeedSequence seed
)

Parameters

seed  SeedSequence
The seed sequence providing entropy.

Implements

IRandomEngine.Seed(SeedSequence)

Exceptions

ArgumentNullExceptionThrown when seed is null.

Seed(ReadOnlySpan<UInt64>, ReadOnlySpan<UInt64>)

Directly sets the Philox key and counter.
C#
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

ArgumentExceptionThrown when key or counter length is incorrect.

See Also