Example #1
0
        internal static void IntrospectiveSort(ChunkedArray <T> keys, int left, int length, IComparer <T> comparer)
        {
            if (length < 2)
            {
                return;
            }

            IntroSort(keys, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length), comparer);
        }
Example #2
0
            private void IntrospectiveSort(int left, int length)
            {
                if (length < 2)
                    return;

                try
                {
                    IntroSort(left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
                }
                catch (IndexOutOfRangeException)
                {
                    IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
                }
                catch (Exception e)
                {
                    throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
                }
            }
Example #3
0
            private void IntrospectiveSort(int left, int length)
            {
                if (length < 2)
                {
                    return;
                }

                try
                {
                    IntroSort(left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
                }
                catch (IndexOutOfRangeException)
                {
                }
                catch (Exception e)
                {
                    throw new InvalidOperationException("IComparerFailed");
                }
            }