Exemplo n.º 1
0
 void Dispose(bool disposing)
 {
     if (!disposing)
     {
         enumerable = null;
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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));
 }