PermutationGetRandomPermutation Method

Get a random permutation.

Definition

Namespace: Meta.Numerics.Functions
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static Permutation GetRandomPermutation(
	int dimension,
	Random rng
)

Parameters

dimension  Int32
The number of elements on which the permutation acts.
rng  Random
A random number generator.

Return Value

Permutation
A random permutation of the specified dimension. All permutations of the specified dimension are equally likely.

See Also