Ejemplo n.º 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);
        }
Ejemplo n.º 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);
                }
            }
Ejemplo n.º 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");
                }
            }