SeedSequences.Default Method

Definition

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

Overload List

Default(Int64, StreamAddress) Creates a SeedSequence using the SFC64 algorithm with optional streaming.
Default(ReadOnlySpan<UInt32>, StreamAddress) Creates a SeedSequence using the SFC64 algorithm with 32-bit seed words.
Default(ReadOnlySpan<UInt64>, StreamAddress) Creates a SeedSequence using the SFC64 algorithm with multiple seed values and optional streaming.

Default(Int64, StreamAddress)

Creates a SeedSequence using the SFC64 algorithm with optional streaming.
C#
public static SeedSequence Default(
	long seed,
	StreamAddress streamAddress = default
)

Parameters

seed  Int64
The initial seed value.
streamAddress  StreamAddress  (Optional)
Optional stream address for stream derivation.

Return Value

SeedSequence
A SeedSequence based on SFC64.

Remarks

This is the recommended factory method for creating seed algorithms. It uses SFC64 mixing with support for stream derivation.

If streamAddress is provided, all its segments are mixed into the initial state to produce a distinct sequence for each stream.

Default(ReadOnlySpan<UInt32>, StreamAddress)

Creates a SeedSequence using the SFC64 algorithm with 32-bit seed words.
C#
public static SeedSequence Default(
	ReadOnlySpan<uint> seeds,
	StreamAddress streamAddress = default
)

Parameters

seeds  ReadOnlySpan<UInt32>
The 32-bit seed words to absorb into the initial state.
streamAddress  StreamAddress  (Optional)
Optional stream address for stream derivation.

Return Value

SeedSequence
A SeedSequence based on SFC64.

Remarks

This factory method accepts 32-bit seed words, which are packed into 64-bit values in little-endian order before being absorbed into the SFC64 state.

If streamAddress is provided, all its segments are mixed into the state after all seed values to produce a distinct sequence for each stream.

Default(ReadOnlySpan<UInt64>, StreamAddress)

Creates a SeedSequence using the SFC64 algorithm with multiple seed values and optional streaming.
C#
public static SeedSequence Default(
	ReadOnlySpan<ulong> seeds,
	StreamAddress streamAddress = default
)

Parameters

seeds  ReadOnlySpan<UInt64>
The seed values to absorb into the initial state.
streamAddress  StreamAddress  (Optional)
Optional stream address for stream derivation.

Return Value

SeedSequence
A SeedSequence based on SFC64.

Remarks

This factory method accepts multiple seed values, which are absorbed into the initial state using SFC64 mixing with Golden Ratio increments.

If streamAddress is provided, all its segments are mixed into the state after all seed values to produce a distinct sequence for each stream.

See Also