Show / Hide Table of Contents

Class PermutationEnumerable<T>

An enumerable of all possible permutations of a given sequence of objects.

Inheritance
System.Object
PermutationEnumerable<T>
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class PermutationEnumerable<T> : IEnumerable<T[]>
Type Parameters
T

Remarks

Implements the Shimon Even variant of the Steinhaus–Johnson–Trotter algorithm.

https://en.wikipedia.org/wiki/Steinhaus%E2%80%93Johnson%E2%80%93Trotter_algorithm#Even.27s_speedup

Constructors

PermutationEnumerable(T[])

Creates a new permutation enumerator over a given sequence.

Declaration
public PermutationEnumerable(T[] sequence)
Parameters
T[] sequence

Methods

GetEnumerator()

Returns the enumerator.

Declaration
public IEnumerator<T[]> GetEnumerator()
Returns
IEnumerator<T[]>

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns the enumerator.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

Back to top Built by Itinero, MIT licensed.