예제 #1
0
 void Dispose(bool disposing)
 {
     if (!disposing)
     {
         enumerable = null;
     }
 }
예제 #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;
     }
 }
예제 #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));
 }