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.3
C#
A random permutation of length length.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
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. |