Permutation.GetRandomPermutation Method
Click or drag to resize

PermutationGetRandomPermutation Method

Get a random permutation.

Namespace:  Meta.Numerics.Functions
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.0.5.0 (4.0.5.0)
Syntax
public static Permutation GetRandomPermutation(
	int dimension,
	Random rng
)

Parameters

dimension
Type: SystemInt32
The number of elements on which the permutation acts.
rng
Type: SystemRandom
A random number generator.

Return Value

Type: Permutation
A random permutation of the specified dimension. All permutations of the specified dimension are equally likely.
See Also