Random Sources.Create Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Create( | Creates a high-performance, reproducible random source from the specified seed. |
| Create( | Creates a reproducible random source from the specified seed and deterministic stream ID. |
| Create<T>() | Creates a non-deterministic random source of the specified type. |
| Create<T>(Int64) | Creates a reproducible random source of the specified type from the given seed. |
| Create<T>(Int64, UInt64) | Creates a reproducible random source of the specified type from the given seed and stream identifier. |
Create<T>
Creates a non-deterministic random source of the specified type.
public static T Create<T>()
where T : Object, IRandomSourceFactory<T>
Type Parameters
- T
- The random source type to create.
Return Value
TA random source instance of type T.
Create(Int64)
Creates a high-performance, reproducible random source from the specified seed.
public static Xoshiro256StarStar Create(
long seed
)Parameters
- seed Int64
Return Value
Xoshiro256StarStarRemarks
This returns a RNG type to allow maximum JIT inlining when passed into performance-critical code.
Create<T>(Int64)
Creates a reproducible random source of the specified type from the given seed.
public static T Create<T>(
long seed
)
where T : Object, IRandomSourceFactory<T>
Parameters
- seed Int64
- The seed used to initialize the random source.
Type Parameters
- T
- The random source type to create.
Return Value
TA random source instance of type T.
Create(Int64, UInt64)
Creates a reproducible random source from the specified seed and deterministic stream ID.
public static Xoshiro256StarStar Create(
long seed,
ulong streamId
)Parameters
Return Value
Xoshiro256StarStarRemarks
Stream IDs are intended to produce independent deterministic streams for parallel or multi-stream use.
Create<T>(Int64, UInt64)
Creates a reproducible random source of the specified type from the given seed and stream identifier.
public static T Create<T>(
long seed,
ulong streamId
)
where T : Object, IRandomSourceFactory<T>
Parameters
- seed Int64
- The base seed used to initialize the random source.
- streamId UInt64
- A deterministic stream identifier used to create an independent stream.
Type Parameters
- T
- The random source type to create.
Return Value
TA random source instance of type T.