IScalarEngine<T>.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#
void Fill(
	Span<T> destination
)

Parameters

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

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