Permutation.Create Random Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Create | Creates a new random permutation of the specified length. |
| Create | Creates a new random permutation of the specified length. |
| Create | Creates a new random permutation of the specified length. |
CreateRandom(Int32, IRandomSource)
Creates a new random permutation of the specified length.
public static Permutation CreateRandom(
int length,
IRandomSource random = null
)Parameters
- length Int32
- The length of the permutation.
- random IRandomSource (Optional)
- Optional. The random number generator.
Return Value
PermutationA random permutation of length length.
Exceptions
| Argument | length is less than zero. |
CreateRandom(Int32, Random)
Creates a new random permutation of the specified length.
public static Permutation CreateRandom(
int length,
Random random
)Parameters
Return Value
PermutationA random permutation of length length.
Exceptions
| Argument | length is less than zero. |
CreateRandom<TGenerator>(Int32, IRandomSource<TGenerator>)
Creates a new random permutation of the specified length.
public static Permutation CreateRandom<TGenerator>(
int length,
IRandomSource<TGenerator> random = null
)
where TGenerator : struct, new(), IRandomGenerator
Parameters
- length Int32
- The length of the permutation.
- random IRandomSource<TGenerator> (Optional)
- Optional. The random number generator.
Type Parameters
- TGenerator
Return Value
PermutationA random permutation of length length.
Exceptions
| Argument | length is less than zero. |