Threefry 4x 64.From Key Method
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| From | Creates a new Threefry4x64 instance with the specified key and counter initialized to zero. |
| From | Creates a new Threefry4x64 instance with the specified key and counter. |
FromKey(ReadOnlySpan<UInt64>)
Creates a new Threefry4x64 instance with the specified key and counter initialized to zero.
public static Threefry4x64 FromKey(
ReadOnlySpan<ulong> key
)Parameters
- key ReadOnlySpan<UInt64>
- The 256-bit key (4 × 64-bit words).
Return Value
Threefry4x64A new Threefry4x64 instance with the specified key and zero counter.
Remarks
This factory method directly sets the Threefry key and initializes the counter to zero, providing direct access to the counter-based RNG's key/counter interface.
Exceptions
| Argument | Thrown when key length is not exactly 4. |
FromKey(ReadOnlySpan<UInt64>, ReadOnlySpan<UInt64>)
Creates a new Threefry4x64 instance with the specified key and counter.
public static Threefry4x64 FromKey(
ReadOnlySpan<ulong> key,
ReadOnlySpan<ulong> counter
)Parameters
- key ReadOnlySpan<UInt64>
- The 256-bit key (4 × 64-bit words).
- counter ReadOnlySpan<UInt64>
- The 256-bit counter (4 × 64-bit words).
Return Value
Threefry4x64A new Threefry4x64 instance with the specified key and counter.
Remarks
This factory method directly sets the Threefry key and counter, providing direct access to the counter-based RNG's key/counter interface.
Exceptions
| Argument | Thrown when key or counter length is incorrect. |