UtilCombinatoricsCalculatePermutationsT(IEnumerableT, Int32, Boolean) Method

Calculates the amount of permutations that can be generated with the specified collection and string length.

Definition

Namespace: DevCase.Core.Math.Combinatorics
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static long CalculatePermutations<T>(
	IEnumerable<T> collection,
	int stringLength,
	bool allowRepetition
)

Parameters

collection  IEnumerableT
An IEnumerableT that contains the elements to permute.
stringLength  Int32
The desired string length of each permutation.
allowRepetition  Boolean
A value indicating whether permutation repetition is allowed.

Type Parameters

T

Return Value

Int64
The resulting amount of permutations that can be generated.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also