Beispiel #1
0
 void Dispose(bool disposing)
 {
     if (!disposing)
     {
         enumerable = null;
     }
 }
Beispiel #2
0
 public ChoiceEnumerator(ChoiceEnumerable <T> enumerable)
 {
     this.enumerable = enumerable;
     chosen          = new int[enumerable.SampleSize];
     for (int i = 0; i < enumerable.SampleSize; ++i)
     {
         chosen[i] = i;
     }
 }
Beispiel #3
0
 public ChoiceEnumerable(int sampleSize, T[] input)
 {
     this.input      = input.Clone() as T[];
     this.sampleSize = sampleSize;
     numElements     = ChoiceEnumerable <T> .Factorial(input.Length) / (ChoiceEnumerable <T> .Factorial(sampleSize) * ChoiceEnumerable <T> .Factorial(input.Length - sampleSize));
 }