RandomSources Class

Provides simple, discoverable entry points for creating and resolving random sources.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
public static class RandomSources
Inheritance
Object  →  RandomSources

Remarks

This type is intended for the common cases: a thread-safe shared source for convenience, and easy creation of reproducible sources from seeds.

Properties

Default Gets or sets the default random source used by Resolve() when an API does not receive an explicit RNG.
Shared Gets a thread-safe, high-performance random source intended for convenience and incidental use.

Methods

Create(Int64) Creates a high-performance, reproducible random source from the specified seed.
Create(Int64, UInt64) 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.
CreateStreams(Int32, Int64) Creates an array of independent, deterministic random sources for parallel processing.
CreateStreams(Int32, Int64, StreamAddress) Creates an array of independent, deterministic random sources for parallel processing.
CreateStreams<T>(Int32, Int64) Creates an array of independent, deterministic random sources of the specified type.
CreateStreams<T>(Int32, Int64, StreamAddress) Creates an array of independent, deterministic random sources of the specified type.

See Also