Philox4x64.Advance Method

Advances the RNG state by the specified number of outputs.

Definition

Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
public void Advance(
	ulong count
)

Parameters

count  UInt64
 

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