The enumerator that enumerates each meta-collection of the enclosing Permutations class.
More...
|
| Enumerator (Permutations< T > source) |
| Construct a enumerator with the parent object. More...
|
|
void | Reset () |
| Resets the permutations enumerator to the first permutation. This will be the first lexicographically order permutation. More...
|
|
bool | MoveNext () |
| Advances to the next permutation. More...
|
|
virtual void | Dispose () |
| Cleans up non-managed resources, of which there are none used here. More...
|
|
| Permutations (IList< T > values) |
| Create a permutation set from the provided list of values. The values (T) must implement IComparable. If T does not implement IComparable use a constructor with an explict IComparer. The repetition type defaults to MetaCollectionType.WithholdRepetitionSets More...
|
|
| Permutations (IList< T > values, GenerateOption type) |
| Create a permutation set from the provided list of values. If type is MetaCollectionType.WithholdRepetitionSets, then values (T) must implement IComparable. If T does not implement IComparable use a constructor with an explict IComparer. More...
|
|
| Permutations (IList< T > values, IComparer< T > comparer) |
| Create a permutation set from the provided list of values. The values will be compared using the supplied IComparer. The repetition type defaults to MetaCollectionType.WithholdRepetitionSets More...
|
|
virtual IEnumerator | GetEnumerator () |
| Gets an enumerator for collecting the list of permutations. More...
|
|
|
object | Current [get] |
| The current permutation. More...
|
|
long | Count [get] |
| The count of all permutations that will be returned. If type is MetaCollectionType.WithholdGeneratedSets, then this does not double count permutations with multiple identical values. I.e. count of permutations of "AAB" will be 3 instead of 6. If type is MetaCollectionType.WithRepetition, then this is all combinations and is therefore N!, where N is the number of values. More...
|
|
GenerateOption | Type [get] |
| The type of Permutations set that is generated. More...
|
|
int | UpperIndex [get] |
| The upper index of the meta-collection, equal to the number of items in the initial set. More...
|
|
int | LowerIndex [get] |
| The lower index of the meta-collection, equal to the number of items returned each iteration. For Permutation, this is always equal to the UpperIndex. More...
|
|
long | Count [get] |
| The count of items in the collection. This is not inherited from ICollection since this meta-collection cannot be extended by users. More...
|
|
GenerateOption | Type [get] |
| The type of the meta-collection, determining how the collections are determined from the inputs. More...
|
|
int | UpperIndex [get] |
| The upper index of the meta-collection, which is the size of the input collection. More...
|
|
int | LowerIndex [get] |
| The lower index of the meta-collection, which is the size of each output collection. More...
|
|
The enumerator that enumerates each meta-collection of the enclosing Permutations class.
Matching.Permutations< T >.Enumerator.Enumerator |
( |
Permutations< T > |
source | ) |
|
Construct a enumerator with the parent object.
- Parameters
-
source | The source Permutations object. |
virtual void Matching.Permutations< T >.Enumerator.Dispose |
( |
| ) |
|
|
virtual |
Cleans up non-managed resources, of which there are none used here.
bool Matching.Permutations< T >.Enumerator.MoveNext |
( |
| ) |
|
Advances to the next permutation.
- Returns
- True if successfully moved to next permutation, False if no more permutations exist.
Continuation was tried (i.e. yield return) by was not nearly as efficient. Performance is further increased by using value types and removing generics, that is, the LexicographicOrder parellel array. This is a issue with the .NET CLR not optimizing as well as it could in this infrequently used scenario.
void Matching.Permutations< T >.Enumerator.Reset |
( |
| ) |
|
Resets the permutations enumerator to the first permutation. This will be the first lexicographically order permutation.
object Matching.Permutations< T >.Enumerator.Current |
|
get |
The documentation for this class was generated from the following file:
- D:/Documents/Polytech/5ème_année/PFE/Dépôt_Projet/GraphMatchingSeb/GraphMatching/Matching/Combinatorics/Permutations.cs