Pcg 32 Constructor
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
| Pcg32() | Initializes a new instance of the Pcg32 class using OS entropy. |
| Pcg32( | Initializes a new instance of the Pcg32 class with the specified options. |
| Pcg32( | Initializes a new instance of the Pcg32 class from saved state. |
| Pcg32( | Initializes a new instance of the Pcg32 class with the specified seed. |
| Pcg32( | Initializes a new instance of the Pcg32 class with the specified seed array. |
| Pcg32( | Initializes a new instance of the Pcg32 class with direct state and stream initialization. |
| Pcg32( | Initializes a new instance of the Pcg32 class with the specified seed. |
| Pcg32( | Initializes a new instance of the Pcg32 class with the specified seed array. |
Pcg32
Initializes a new instance of the Pcg32 class using OS entropy.
public Pcg32()Pcg32(RandomOptions)
Initializes a new instance of the Pcg32 class with the specified options.
public Pcg32(
RandomOptions options
)Parameters
- options RandomOptions
- The initialization options containing seed, stream ID, and seed profile.
Pcg32(ReadOnlySpan<Byte>)
Initializes a new instance of the Pcg32 class from saved state.
public Pcg32(
ReadOnlySpan<byte> state
)Parameters
- state ReadOnlySpan<Byte>
- The saved state to restore.
Exceptions
| Argument | The length of state is less than the required state size. |
Pcg32(Int64, SeedProfile)
Initializes a new instance of the Pcg32 class with the specified seed.
public Pcg32(
long seed,
SeedProfile seedProfile = SeedProfile.Default
)Parameters
- seed Int64
- A number used to calculate a starting value for the pseudo-random number sequence.
- seedProfile SeedProfile (Optional)
- The seed profile to use for initialization.
Pcg32(ReadOnlySpan<UInt32>, SeedProfile)
Initializes a new instance of the Pcg32 class with the specified seed array.
public Pcg32(
ReadOnlySpan<uint> seedMaterial,
SeedProfile seedProfile = SeedProfile.Default
)Parameters
- seedMaterial ReadOnlySpan<UInt32>
- An array of numbers used to calculate a starting value for the pseudo-random number sequence.
- seedProfile SeedProfile (Optional)
- The seed profile to use for initialization.
Exceptions
| Argument | seedMaterial is null. |
Pcg32(UInt64, UInt64)
Initializes a new instance of the Pcg32 class with direct state and stream initialization.
public Pcg32(
ulong state,
ulong stream
)Parameters
Remarks
This constructor directly sets the internal state and stream, matching the canonical PCG32 initialization.
Pcg32(Int64, StreamAddress, SeedProfile)
Initializes a new instance of the Pcg32 class with the specified seed.
public Pcg32(
long seed,
StreamAddress streamAddress,
SeedProfile seedProfile = SeedProfile.Default
)Parameters
- seed Int64
- A number used to calculate a starting value for the pseudo-random number sequence.
- streamAddress StreamAddress
- Optional stream identifier for stream selection.
- seedProfile SeedProfile (Optional)
- The seed profile to use for initialization.
Pcg32(ReadOnlySpan<UInt32>, StreamAddress, SeedProfile)
Initializes a new instance of the Pcg32 class with the specified seed array.
public Pcg32(
ReadOnlySpan<uint> seedMaterial,
StreamAddress streamAddress,
SeedProfile seedProfile = SeedProfile.Default
)Parameters
- seedMaterial ReadOnlySpan<UInt32>
- An array of numbers used to calculate a starting value for the pseudo-random number sequence.
- streamAddress StreamAddress
- Optional stream identifier for stream selection.
- seedProfile SeedProfile (Optional)
- The seed profile to use for initialization.
Exceptions
| Argument | seedMaterial is null. |