void Dispose(bool disposing) { if (!disposing) { enumerable = null; } }
public ChoiceEnumerator(ChoiceEnumerable <T> enumerable) { this.enumerable = enumerable; chosen = new int[enumerable.SampleSize]; for (int i = 0; i < enumerable.SampleSize; ++i) { chosen[i] = i; } }
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)); }