Mersenne Twister 64Engine.Fill Method
Fills the destination span with values from a contiguous range of indices
within the current block.
Definition
Namespace: Numerics.NET.Random.Engines
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public void Fill(
int startIndex,
Span<ulong> destination
)Parameters
- startIndex Int32
- The starting index within the current block. Must be in the range [0, BlockLength).
- destination Span<UInt64>
- The span to fill with native T words.
Implements
IBlockEngine<T>.Fill(Int32, Span<T>)Remarks
This method fills destination with values from block indices [startIndex, startIndex + destination.Length).
This method is a pure function: it does not mutate engine state. It is equivalent to:
for (int i = 0; i < destination.Length; i++)
{
destination[i] = Output(startIndex + i);
}
All accessed indices must be in the range [0, BlockLength). Attempting to read beyond the block boundary results in undefined behavior.