GraphLib  2.0
une librairie C# pour l’exploitation de graphes en reconnaissance des formes
 All Classes Namespaces Functions Enumerations Enumerator Properties
Matching.Combinations< T >.Enumerator Class Reference

The enumerator that enumerates each meta-collection of the enclosing Combinations class. More...

Inheritance diagram for Matching.Combinations< T >.Enumerator:
Matching.Combinations< T > Matching.IMetaCollection< T >

Public Member Functions

 Enumerator (Combinations< T > source)
 Construct a enumerator with the parent object. More...
 
void Reset ()
 Resets the combinations enumerator to the first combination. More...
 
bool MoveNext ()
 Advances to the next combination of items from the set. More...
 
void Dispose ()
 Cleans up non-managed resources, of which there are none used here. More...
 
- Public Member Functions inherited from Matching.Combinations< T >
 Combinations (IList< T > values, int lowerIndex)
 Create a combination set from the provided list of values. The upper index is calculated as values.Count, the lower index is specified. Collection type defaults to MetaCollectionType.WithoutRepetition More...
 
 Combinations (IList< T > values, int lowerIndex, GenerateOption type)
 Create a combination set from the provided list of values. The upper index is calculated as values.Count, the lower index is specified. More...
 
IEnumerator< IList< T > > GetEnumerator ()
 Gets an enumerator for collecting the list of combinations. More...
 

Properties

IList< T > Current [get]
 The current combination More...
 
- Properties inherited from Matching.Combinations< T >
long Count [get]
 The number of unique combinations that are defined in this meta-collection. This value is mathematically defined as Choose(M, N) where M is the set size and N is the subset size. This is M! / (N! * (M-N)!). More...
 
GenerateOption Type [get]
 The type of Combinations 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. More...
 
- Properties inherited from Matching.IMetaCollection< T >
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...
 

Additional Inherited Members

- Protected Member Functions inherited from Matching.Combinations< T >
 Combinations ()
 No default constructor, must provided a list of values and size. More...
 

Detailed Description

The enumerator that enumerates each meta-collection of the enclosing Combinations class.

Constructor & Destructor Documentation

Matching.Combinations< T >.Enumerator.Enumerator ( Combinations< T >  source)

Construct a enumerator with the parent object.

Parameters
sourceThe source combinations object.

Member Function Documentation

void Matching.Combinations< T >.Enumerator.Dispose ( )

Cleans up non-managed resources, of which there are none used here.

bool Matching.Combinations< T >.Enumerator.MoveNext ( )

Advances to the next combination of items from the set.

Returns
True if successfully moved to next combination, False if no more unique combinations exist.

The heavy lifting is done by the permutations object, the combination is generated by creating a new list of those items that have a true in the permutation parrellel array.

void Matching.Combinations< T >.Enumerator.Reset ( )

Resets the combinations enumerator to the first combination.

Property Documentation

IList<T> Matching.Combinations< T >.Enumerator.Current
get

The current combination


The documentation for this class was generated from the following file: