Mersenne Twister Engine.Output Method
Returns the native word at the specified index within the current block.
Definition
Namespace: Numerics.NET.Random.Engines
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
A T value produced by applying the output mapping function to the current block state at the specified index.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public uint Output(
int index
)Parameters
- index Int32
- The index within the current block. Must be in the range [0, BlockLength).
Return Value
UInt32A T value produced by applying the output mapping function to the current block state at the specified index.
Implements
IBlockEngine<T>.Output(Int32)Remarks
This method is a pure function: it does not mutate engine state. Calling Output(Int32) multiple times with the same index without an intervening AdvanceBlock() will return the same value.
The output mapping may involve applying algorithm-specific transformations (e.g., tempering in Mersenne Twister) to raw block state.
index must be in the range [0, BlockLength). Indices outside this range result in undefined behavior.