Beispiel #1
0
        protected override int[] Initialize(int size, int maxIndex)
        {
            int[] indices      = Enumerable.Range(0, maxIndex + 1).ToArray();
            var   combinations = Combinatorix.Combinations(indices, size);

            combinationsEnumerator = combinations.GetEnumerator();

            return(base.Initialize(size, maxIndex));
        }
Beispiel #2
0
        private void ReinitializePermutations()
        {
            var permutations = Combinatorix.Permutations(combinationsEnumerator.Current);

            permutationsEnumerator = permutations.GetEnumerator();
        }