Wy Rand Engine.Advance Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Advance() | Advances the engine state by one transition step. |
| Advance( | Advances the RNG state by the specified number of outputs. |
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)
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.