Example #1
0
        public IEnumerator <TElement> GetEnumerator()
        {
            Buffer <TElement> buffer = new Buffer <TElement>(source);

            if (buffer.count > 0)
            {
                EnumerableSorter <TElement> sorter = GetEnumerableSorter(null);
                int[] map = sorter.Sort(buffer.items, buffer.count);
                sorter = null;
                for (int i = 0; i < buffer.count; i++)
                {
                    yield return(buffer.items[map[i]]);
                }
            }
        }
Example #2
0
 internal abstract EnumerableSorter <TElement> GetEnumerableSorter(EnumerableSorter <TElement> next);