Click or drag to resize

PermutationGetPermutations Method

Generates all permutations of the given dimension.

Namespace:  Meta.Numerics.Functions
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
Syntax
public static IEnumerable<Permutation> GetPermutations(
	int dimension
)

Parameters

dimension
Type: SystemInt32
The number of elements on which the permutations act.

Return Value

Type: IEnumerablePermutation
All permutations of the given dimension.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptiondimension is negative.
Remarks

The number of permutations of dimension n is n!, which increases very rapidly as n increases. Even in cases where n! would overflow a Int32 or Int64, this method will successfully produce all permutations. Of course, in such cases, it will take a long time to enumerate them all.

See Also