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); }
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); } }
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"); } }