Pcg64Engine.Seed Method

Definition

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

Overload List

Seed(SeedSequence) Initializes the engine state from a seed sequence.
Seed(UInt128, UInt128) Directly sets the PCG64 128-bit state and stream.
Seed(UInt64, UInt64, UInt64, UInt64) Directly sets the PCG64 128-bit state and stream.

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(UInt128, UInt128)

Directly sets the PCG64 128-bit state and stream.
C#
public void Seed(
	UInt128 state,
	UInt128 stream
)

Parameters

state  UInt128
The 128-bit LCG state.
stream  UInt128
The 128-bit stream selector.

Remarks

This is the canonical PCG64 seeding routine that directly sets the 128-bit state and 128-bit stream. The increment is derived as: inc = (stream << 1) | 1.

Seed(UInt64, UInt64, UInt64, UInt64)

Directly sets the PCG64 128-bit state and stream.
C#
public void Seed(
	ulong stateLo,
	ulong stateHi,
	ulong streamLo,
	ulong streamHi
)

Parameters

stateLo  UInt64
Low 64 bits of the 128-bit LCG state.
stateHi  UInt64
High 64 bits of the 128-bit LCG state.
streamLo  UInt64
Low 64 bits of the stream selector.
streamHi  UInt64
High 64 bits of the stream selector.

Remarks

This is the canonical PCG64 seeding routine that directly sets the 128-bit state and 128-bit stream. The increment is derived as: inc = (stream << 1) | 1.

See Also