Pcg64 Constructor

Definition

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

Overload List

Pcg64() Initializes a new instance of the Pcg64 class using OS entropy.
Pcg64(RandomOptions) Initializes a new instance of the Pcg64 class with the specified options.
Pcg64(ReadOnlySpan<Byte>) Initializes a new instance of the Pcg64 class from saved state.
Pcg64(UInt64) Initializes a new instance of the Pcg64 class with direct state initialization.
Pcg64(Int64, SeedProfile) Initializes a new instance of the Pcg64 class with the specified seed.
Pcg64(ReadOnlySpan<UInt64>, SeedProfile) Initializes a new instance of the Pcg64 class with the specified seed array.
Pcg64(UInt128, UInt128) Initializes a new instance of the Pcg64 class with direct state and stream initialization.
Pcg64(UInt64, UInt64) Initializes a new instance of the Pcg64 class with direct state and stream initialization.
Pcg64(Int64, StreamAddress, SeedProfile) Initializes a new instance of the Pcg64 class with the specified seed.
Pcg64(ReadOnlySpan<UInt64>, StreamAddress, SeedProfile) Initializes a new instance of the Pcg64 class with the specified seed array.
Pcg64(UInt64, UInt64, UInt64, UInt64) Initializes a new instance of the Pcg64 class with direct state and stream initialization.

Pcg64

Initializes a new instance of the Pcg64 class using OS entropy.
C#
public Pcg64()

Pcg64(RandomOptions)

Initializes a new instance of the Pcg64 class with the specified options.
C#
public Pcg64(
	RandomOptions options
)

Parameters

options  RandomOptions
 

Pcg64(ReadOnlySpan<Byte>)

Initializes a new instance of the Pcg64 class from saved state.
C#
public Pcg64(
	ReadOnlySpan<byte> state
)

Parameters

state  ReadOnlySpan<Byte>
 

Pcg64(UInt64)

Initializes a new instance of the Pcg64 class with direct state initialization.
C#
public Pcg64(
	ulong state
)

Parameters

state  UInt64
The 64-bit LCG state.

Remarks

This constructor directly sets the internal 128-bit state and stream (0), matching the canonical PCG64 initialization.

Pcg64(Int64, SeedProfile)

Initializes a new instance of the Pcg64 class with the specified seed.
C#
public Pcg64(
	long seed,
	SeedProfile seedProfile = SeedProfile.Default
)

Parameters

seed  Int64
 
seedProfile  SeedProfile  (Optional)
 

Pcg64(ReadOnlySpan<UInt64>, SeedProfile)

Initializes a new instance of the Pcg64 class with the specified seed array.
C#
public Pcg64(
	ReadOnlySpan<ulong> seedMaterial,
	SeedProfile seedProfile = SeedProfile.Default
)

Parameters

seedMaterial  ReadOnlySpan<UInt64>
 
seedProfile  SeedProfile  (Optional)
 

Pcg64(UInt128, UInt128)

Initializes a new instance of the Pcg64 class with direct state and stream initialization.
C#
public Pcg64(
	UInt128 state,
	UInt128 stream
)

Parameters

state  UInt128
The 128-bit LCG state.
stream  UInt128
The 128-bit stream selector.

Remarks

This constructor directly sets the internal 128-bit state and stream, matching the canonical PCG64 initialization.

Pcg64(UInt64, UInt64)

Initializes a new instance of the Pcg64 class with direct state and stream initialization.
C#
public Pcg64(
	ulong state,
	ulong stream
)

Parameters

state  UInt64
The 64-bit LCG state.
stream  UInt64
The 64-bit stream selector.

Remarks

This constructor directly sets the internal 128-bit state and stream, matching the canonical PCG64 initialization.

Pcg64(Int64, StreamAddress, SeedProfile)

Initializes a new instance of the Pcg64 class with the specified seed.
C#
public Pcg64(
	long seed,
	StreamAddress streamAddress,
	SeedProfile seedProfile = SeedProfile.Default
)

Parameters

seed  Int64
 
streamAddress  StreamAddress
 
seedProfile  SeedProfile  (Optional)
 

Pcg64(ReadOnlySpan<UInt64>, StreamAddress, SeedProfile)

Initializes a new instance of the Pcg64 class with the specified seed array.
C#
public Pcg64(
	ReadOnlySpan<ulong> seedMaterial,
	StreamAddress streamAddress,
	SeedProfile seedProfile = SeedProfile.Default
)

Parameters

seedMaterial  ReadOnlySpan<UInt64>
 
streamAddress  StreamAddress
 
seedProfile  SeedProfile  (Optional)
 

Pcg64(UInt64, UInt64, UInt64, UInt64)

Initializes a new instance of the Pcg64 class with direct state and stream initialization.
C#
public Pcg64(
	ulong stateLo,
	ulong stateHi,
	ulong streamLo,
	ulong streamHi
)

Parameters

stateLo  UInt64
Low 64 bits of the 128-bit LCG state.
stateHi  UInt64
High 64 bits of the 128-bit LCG state.
streamLo  UInt64
Low 64 bits of the stream selector.
streamHi  UInt64
High 64 bits of the stream selector.

Remarks

This constructor directly sets the internal 128-bit state and stream, matching the canonical PCG64 initialization.

See Also