MersenneTwister64Engine.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#
public ulong Output(
	int index
)

Parameters

index  Int32
The index within the current block. Must be in the range [0, BlockLength).

Return Value

UInt64
A 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.

See Also