RandomSourceExtensions.Fill Method

Definition

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

Overload List

Fill(IRandomSource, IList<Double>) Fills the elements of a specified span with random double-precision floating-point numbers.
Fill(IRandomSource, Span<Double>) Fills the elements of a specified span with random double-precision floating-point numbers.
Fill(IRandomSource, Span<Int32>) Fills the elements of a specified span with random 32-bit signed integers.
Fill(IRandomSource, Span<Int64>) Fills the elements of a specified span with random 64-bit signed integers.
Fill(IRandomSource, Span<Single>) Fills the elements of a specified span with random single-precision floating-point numbers.
Fill(IRandomSource, Span<Int32>, Int32) Fills the elements of a specified span with random 32-bit signed integers less than the specified maximum.
Fill(IRandomSource, Span<Int64>, Int64) Fills the elements of a specified span with random 64-bit signed integers less than the specified maximum.
Fill(IRandomSource, Span<Int32>, Int32, Int32) Fills the elements of a specified span with random 32-bit signed integers within a specified range.
Fill(IRandomSource, Span<Int64>, Int64, Int64) Fills the elements of a specified span with random 64-bit signed integers within a specified range.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Double>) Fills the elements of a specified span with random double-precision floating-point numbers.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>) Fills the elements of a specified span with random 32-bit signed integers.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int64>) Fills the elements of a specified span with random 64-bit signed integers.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Single>) Fills the elements of a specified span with random single-precision floating-point numbers.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>, Int32) Fills the elements of a specified span with random 32-bit signed integers less than the specified maximum.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int64>, Int64) Fills the elements of a specified span with random 64-bit signed integers less than the specified maximum.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>, Int32, Int32) Fills the elements of a specified span with random 32-bit signed integers within a specified range.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int64>, Int64, Int64) Fills the elements of a specified span with random 64-bit signed integers within a specified range.

Fill(IRandomSource, IList<Double>)

Fills the elements of a specified span with random double-precision floating-point numbers.
C#
public static void Fill(
	this IRandomSource rng,
	IList<double> destination
)

Parameters

rng  IRandomSource
 
destination  IList<Double>
The span to fill with random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Double>)

Fills the elements of a specified span with random double-precision floating-point numbers.
C#
public static void Fill(
	this IRandomSource rng,
	Span<double> destination
)

Parameters

rng  IRandomSource
 
destination  Span<Double>
The span to fill with random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Int32>)

Fills the elements of a specified span with random 32-bit signed integers.
C#
public static void Fill(
	this IRandomSource rng,
	Span<int> destination
)

Parameters

rng  IRandomSource
 
destination  Span<Int32>
The span to fill with random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Int64>)

Fills the elements of a specified span with random 64-bit signed integers.
C#
public static void Fill(
	this IRandomSource rng,
	Span<long> destination
)

Parameters

rng  IRandomSource
 
destination  Span<Int64>
The span to fill with random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Single>)

Fills the elements of a specified span with random single-precision floating-point numbers.
C#
public static void Fill(
	this IRandomSource rng,
	Span<float> destination
)

Parameters

rng  IRandomSource
 
destination  Span<Single>
The span to fill with random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Double>)

Fills the elements of a specified span with random double-precision floating-point numbers.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<double> destination
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Double>
The span to fill with random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>)

Fills the elements of a specified span with random 32-bit signed integers.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<int> destination
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Int32>
The span to fill with random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int64>)

Fills the elements of a specified span with random 64-bit signed integers.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<long> destination
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Int64>
The span to fill with random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Single>)

Fills the elements of a specified span with random single-precision floating-point numbers.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<float> destination
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Single>
The span to fill with random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Int32>, Int32)

Fills the elements of a specified span with random 32-bit signed integers less than the specified maximum.
C#
public static void Fill(
	this IRandomSource rng,
	Span<int> destination,
	int maxValue
)

Parameters

rng  IRandomSource
 
destination  Span<Int32>
The span to fill with random numbers.
maxValue  Int32
The exclusive upper bound of the random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Int64>, Int64)

Fills the elements of a specified span with random 64-bit signed integers less than the specified maximum.
C#
public static void Fill(
	this IRandomSource rng,
	Span<long> destination,
	long maxValue
)

Parameters

rng  IRandomSource
 
destination  Span<Int64>
The span to fill with random numbers.
maxValue  Int64
The exclusive upper bound of the random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>, Int32)

Fills the elements of a specified span with random 32-bit signed integers less than the specified maximum.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<int> destination,
	int maxValue
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Int32>
The span to fill with random numbers.
maxValue  Int32
The exclusive upper bound of the random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int64>, Int64)

Fills the elements of a specified span with random 64-bit signed integers less than the specified maximum.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<long> destination,
	long maxValue
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Int64>
The span to fill with random numbers.
maxValue  Int64
The exclusive upper bound of the random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Int32>, Int32, Int32)

Fills the elements of a specified span with random 32-bit signed integers within a specified range.
C#
public static void Fill(
	this IRandomSource rng,
	Span<int> destination,
	int minValue,
	int maxValue
)

Parameters

rng  IRandomSource
 
destination  Span<Int32>
The span to fill with random numbers.
minValue  Int32
The inclusive lower bound of the random numbers.
maxValue  Int32
The exclusive upper bound of the random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Int64>, Int64, Int64)

Fills the elements of a specified span with random 64-bit signed integers within a specified range.
C#
public static void Fill(
	this IRandomSource rng,
	Span<long> destination,
	long minValue,
	long maxValue
)

Parameters

rng  IRandomSource
 
destination  Span<Int64>
The span to fill with random numbers.
minValue  Int64
The inclusive lower bound of the random numbers.
maxValue  Int64
The exclusive upper bound of the random numbers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>, Int32, Int32)

Fills the elements of a specified span with random 32-bit signed integers within a specified range.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<int> destination,
	int minValue,
	int maxValue
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Int32>
The span to fill with random numbers.
minValue  Int32
The inclusive lower bound of the random numbers.
maxValue  Int32
The exclusive upper bound of the random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int64>, Int64, Int64)

Fills the elements of a specified span with random 64-bit signed integers within a specified range.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> rng,
	Span<long> destination,
	long minValue,
	long maxValue
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 
destination  Span<Int64>
The span to fill with random numbers.
minValue  Int64
The inclusive lower bound of the random numbers.
maxValue  Int64
The exclusive upper bound of the random numbers.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also