"

BlockBuffer32<TBlockRng> Class

Summary

Assists in implementing block based RNGs.
Namespace
RandN.Implementation
Interfaces
Base Types
  • object

Syntax

public sealed class BlockBuffer32<TBlockRng> : IRng where TBlockRng : notnull, IBlockRngCore<uint>

Type Parameters

NameDescription
TBlockRng

Constructors

NameSummary
BlockBuffer32(TBlockRng)Constructs a new instance filled from rng.

Properties

NameValueSummary
BlockLengthint
The length of the block.
Indexint
The index to the location within the current block.

Methods

NameValueSummary
Fill(Span<byte>)void
Completely fills the span with random bytes.
GenerateAndSet(int)void
Generates and stores the next block and sets Index to index.
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.