PermutationGetRandomPermutation Method |
Get a random permutation.
Namespace:
Meta.Numerics.Functions
Assembly:
Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
Syntax public static Permutation GetRandomPermutation(
int dimension,
Random rng
)
Public Shared Function GetRandomPermutation (
dimension As Integer,
rng As Random
) As Permutation
public:
static Permutation^ GetRandomPermutation(
int dimension,
Random^ rng
)
static member GetRandomPermutation :
dimension : int *
rng : Random -> Permutation
Parameters
- dimension
- Type: SystemInt32
The number of elements on which the permutation acts. - rng
- Type: SystemRandom
A random number generator.
Return Value
Type:
PermutationA random permutation of the specified dimension. All permutations of the specified dimension are equally likely.
See Also