Click or drag to resize
PermutationPermutations Method
Generates all permutations of the given dimension.

Namespace:  Meta.Numerics.Functions
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 3.1.0.0 (3.1.0.0)
Syntax
public static IEnumerable<Permutation> Permutations(
	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, we do successfully produce all permutations. Of course, in such cases, it will take a long time to enumerate them all.

See Also