IRandomGenerator.Fill Method

Definition

Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0

Overload List

Fill(Span<Double>) Fills the specified span with random double-precision floating-point numbers.
Fill(Span<Single>) Fills the specified span with random single-precision floating-point numbers.
Fill(Span<UInt32>) Fills the specified span with random 32-bit unsigned integers.
Fill(Span<UInt64>) Fills the specified span with random 64-bit unsigned integers.

Fill(Span<Double>)

Fills the specified span with random double-precision floating-point numbers.
C#
void Fill(
	Span<double> destination
)

Parameters

destination  Span<Double>
The span to fill with Double values.

Remarks

This method is equivalent to repeatedly calling NextDouble() for each element, but implementations may optimize for bulk generation.

Fill(Span<Single>)

Fills the specified span with random single-precision floating-point numbers.
C#
void Fill(
	Span<float> destination
)

Parameters

destination  Span<Single>
The span to fill with Single values.

Remarks

This method is equivalent to repeatedly calling NextSingle() for each element, but implementations may optimize for bulk generation.

Fill(Span<UInt32>)

Fills the specified span with random 32-bit unsigned integers.
C#
void Fill(
	Span<uint> destination
)

Parameters

destination  Span<UInt32>
The span to fill with UInt32 values.

Remarks

This method is equivalent to repeatedly calling NextUInt32() for each element, but implementations may optimize for bulk generation.

Fill(Span<UInt64>)

Fills the specified span with random 64-bit unsigned integers.
C#
void Fill(
	Span<ulong> destination
)

Parameters

destination  Span<UInt64>
The span to fill with UInt64 values.

Remarks

This method is equivalent to repeatedly calling NextUInt64() for each element, but implementations may optimize for bulk generation.

See Also