Permutation.Create Random 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#
A random permutation of length length.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
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
PermutationA random permutation of length length.
Exceptions
Argument | length is less than zero. |