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]]); } } }
internal abstract EnumerableSorter <TElement> GetEnumerableSorter(EnumerableSorter <TElement> next);