Random Options Constructor
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
Overload List
| Random | Constructs a new RandomOptions with the specified parameters. |
| Random | Constructs a new RandomOptions with a uint[] seed array. |
| Random | Constructs a new RandomOptions with the specified parameters. |
RandomOptions(Int64, StreamAddress, SeedProfile)
Constructs a new RandomOptions with the specified parameters.
public RandomOptions(
long seed,
StreamAddress streamAddress = default,
SeedProfile seedProfile = SeedProfile.Default
)Parameters
- seed Int64
- The seed value used for initialization.
- streamAddress StreamAddress (Optional)
- Optional stream address (default: empty).
- seedProfile SeedProfile (Optional)
- The seed profile (default: Default).
Remarks
This constructor does not perform validation. Validation should be performed by calling Validate.
Exceptions
| Argument | seedProfile is not a valid SeedProfile value. |
RandomOptions(ReadOnlySpan<UInt32>, StreamAddress, SeedProfile)
Constructs a new RandomOptions with a uint[] seed array.
public RandomOptions(
ReadOnlySpan<uint> seedArray,
StreamAddress streamAddress = default,
SeedProfile seedProfile = SeedProfile.Default
)Parameters
- seedArray ReadOnlySpan<UInt32>
- The 32-bit seed array values.
- streamAddress StreamAddress (Optional)
- Optional stream address (default: empty).
- seedProfile SeedProfile (Optional)
- The seed profile (default: Default).
Remarks
This constructor is primarily used by 32-bit RNGs.
The seed array is used as-is (cloned for immutability).
Exceptions
| Argument | seedArray is null. |
| Argument | seedProfile is not a valid SeedProfile value. |
RandomOptions(ReadOnlySpan<UInt64>, StreamAddress, SeedProfile)
Constructs a new RandomOptions with the specified parameters.
public RandomOptions(
ReadOnlySpan<ulong> seedArray,
StreamAddress streamAddress = default,
SeedProfile seedProfile = SeedProfile.Default
)Parameters
- seedArray ReadOnlySpan<UInt64>
- The seed array values.
- streamAddress StreamAddress (Optional)
- Optional stream address (default: empty).
- seedProfile SeedProfile (Optional)
- The seed profile (default: Default).
Remarks
This constructor does not perform validation. Validation should be performed by calling Validate.
Exceptions
| Argument | seedArray is null. |
| Argument | seedProfile is not a valid SeedProfile value. |