CounterBasedGenerator64<TEngine>.AdvanceBlock Method

Advances the counter by the specified number of blocks.

Definition

Namespace: Numerics.NET.Random.Generators
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
public void AdvanceBlock(
	ulong blockCount
)

Parameters

blockCount  UInt64
The number of blocks to advance. Each block corresponds to BlockLength output values.

Implements

ICounterBased<T>.AdvanceBlock(UInt64)

Remarks

This method increments the counter by blockCount in counter space, performing proper carry propagation for multi-word counters. This provides O(1) skip-ahead capability.

This operation is an overload of the single-step AdvanceBlock() method, allowing efficient advancement by multiple blocks.

Consistency:

After calling AdvanceBlock(UInt64), implementations may either regenerate the block (leaving the engine consistent) or leave the block stale (leaving the engine inconsistent). Callers should assume the engine is inconsistent after this call and invoke GenerateBlock() before using output methods.

See Also