Permutation.CreateRandom Method

Creates a new random permutation of the specified length.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public static Permutation CreateRandom(
	int length,
	Random? random = null
)

Parameters

length  Int32
The length of the permutation.
random  Random  (Optional)
Optional. The random number generator.

Return Value

Permutation
A random permutation of length length.

Exceptions

ArgumentOutOfRangeException

length is less than zero.

See Also