IRng Interface
A Random Number Generator (RNG)
IRng
ISeekableRng<TCounter>
ChaCha
XorShift
Pcg32
SmallRng
BlockBuffer32<TBlockRng, TBlockCounter>
ThreadLocalRng
StandardRng
BlockBuffer32<TBlockRng>
Mt1993764
CryptoServiceProvider
ICryptoRng

Syntax

public interface IRng

Methods

NameReturn ValueSummary
Fill(Span<byte>)void
Completely fills the span with random bytes.
NextUInt32()uint
Returns the next 32 bits in the sequence as a UInt32.
NextUInt64()ulong
Returns the next 64 bits in the sequence as a UInt64.

Extension Methods

NameValueSummary
Sample<IRng, TDistribution, TResult>(TDistribution)TResult
Samples the distribution from rng.
Sample<IRng, TResult>(IDistribution<TResult>)TResult
Samples the distribution from rng.
ShuffleInPlace<IRng, T>(IList<T>)void
Shuffles a list using the in-place Fisher-Yates shuffling algorithm.