NumpySeedSequence Constructor

Definition

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

Overload List

NumpySeedSequence(ReadOnlySpan<UInt32>, StreamAddress) Initializes a new instance of the NumpySeedSequence class with 32-bit entropy values and optional stream address.
NumpySeedSequence(ReadOnlySpan<UInt64>, StreamAddress) Initializes a new instance of the NumpySeedSequence class with 32-bit entropy values and optional stream address.
NumpySeedSequence(UInt64, StreamAddress) Initializes a new instance of the NumpySeedSequence class with a 64-bit seed and optional stream address.

NumpySeedSequence(ReadOnlySpan<UInt32>, StreamAddress)

Initializes a new instance of the NumpySeedSequence class with 32-bit entropy values and optional stream address.
C#
public NumpySeedSequence(
	ReadOnlySpan<uint> entropy,
	StreamAddress streamAddress = default
)

Parameters

entropy  ReadOnlySpan<UInt32>
The 32-bit entropy values.
streamAddress  StreamAddress  (Optional)
Optional stream address for stream derivation. When provided, all segments are appended to the entropy after the provided values.

Remarks

The entropy values and optional stream address segments are mixed into the entropy pool using NumPy's mixing algorithm. This constructor provides the most direct correspondence to NumPy's SeedSequence(entropy, spawn_key) initialization.

NumpySeedSequence(ReadOnlySpan<UInt64>, StreamAddress)

Initializes a new instance of the NumpySeedSequence class with 32-bit entropy values and optional stream address.
C#
public NumpySeedSequence(
	ReadOnlySpan<ulong> entropy,
	StreamAddress streamAddress = default
)

Parameters

entropy  ReadOnlySpan<UInt64>
The 32-bit entropy values.
streamAddress  StreamAddress  (Optional)
Optional stream address for stream derivation. When provided, all segments are appended to the entropy after the provided values.

Remarks

The entropy values and optional stream address segments are mixed into the entropy pool using NumPy's mixing algorithm. This constructor provides the most direct correspondence to NumPy's SeedSequence(entropy, spawn_key) initialization.

NumpySeedSequence(UInt64, StreamAddress)

Initializes a new instance of the NumpySeedSequence class with a 64-bit seed and optional stream address.
C#
public NumpySeedSequence(
	ulong seed,
	StreamAddress streamAddress = default
)

Parameters

seed  UInt64
The initial seed value.
streamAddress  StreamAddress  (Optional)
Optional stream address for stream derivation. When provided, all segments are appended to the entropy after the seed value.

Remarks

The 64-bit seed is converted to 32-bit words (eliminating trailing zeros), optionally combined with the stream address segments, and then mixed into the entropy pool using NumPy's mixing algorithm.

See Also