Xoshiro256StarStarEngine.Advance Method

Definition

Namespace: Numerics.NET.Random.Engines
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0

Overload List

Advance() Advances the engine state by one transition step.
Advance(UInt64) Advances the RNG state by the specified number of outputs.

Advance

Advances the engine state by one transition step.
C#
public void Advance()

Implements

IScalarEngine<T>.Advance()

Remarks

This method performs the state transition function, evolving the internal state by exactly one step. It does not produce output; use Next() to retrieve the output value corresponding to the current state.

The transition function is algorithm-specific and deterministic. Calling Advance() multiple times advances the state through the generator's sequence in a reproducible manner.

Advance(UInt64)

Advances the RNG state by the specified number of outputs.
C#
public void Advance(
	ulong delta
)

Parameters

delta  UInt64
The number of NextUInt64() calls to advance by.

Implements

IAdvanceable.Advance(UInt64)

Remarks

This operation is computed in O(log delta) time and is equivalent to calling NextUInt64() exactly delta times.

The state advancement uses modular arithmetic consistent with the generator's period. For generators with period 2^n, advancing by delta ≥ 2^n will wrap around appropriately.

  Caution

While O(log n) is efficient, very large deltas may still incur noticeable computation time. For massive skips (e.g., 2^64 or larger), consider using counter-based RNGs with direct position setting if available.

See Also