Pcg32Engine.Fill Method

Fills the destination span with successive native words from the engine's stream.

Definition

Namespace: Numerics.NET.Random.Engines
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
public void Fill(
	Span<uint> destination
)

Parameters

destination  Span<UInt32>
The span to fill with native T words.

Implements

IScalarEngine<T>.Fill(Span<T>)

Remarks

This method is equivalent to repeatedly calling Next() and storing the returned values:

for (int i = 0; i < destination.Length; i++) { destination[i] = Next(); }

Implementations may optimize this operation (e.g., using loop unrolling or vectorization) as long as the produced sequence matches repeated Next() calls.

See Also