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
)
Public Shared Function GetPermutations (
dimension As Integer
) As IEnumerable(Of Permutation)
public:
static IEnumerable<Permutation^>^ GetPermutations(
int dimension
)
static member GetPermutations :
dimension : int -> IEnumerable<Permutation>
Parameters
- dimension
- Type: SystemInt32
The number of elements on which the permutations act.
Return Value
Type:
IEnumerablePermutationAll permutations of the given dimension.
Exceptions 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