7[TypeDependency(
"System.Collections.Generic.GenericArraySortHelper`1")]
8internal sealed class ArraySortHelper<T> : IArraySortHelper<T>
129 int num =
keys.Length;
165 int num = keys.Length - 1;
198 for (
int num =
length >> 1; num >= 1; num--)
231 for (
int i = 0; i < keys.Length - 1; i++)
244[TypeDependency(
"System.Collections.Generic.GenericArraySortHelper`2")]
311 int num =
keys.Length;
349 int num = keys.Length - 1;
382 for (
int num =
length >> 1; num >= 1; num--)
395 TKey val =
keys[i - 1];
418 for (
int i = 0; i < keys.Length - 1; i++)
420 TKey val =
keys[i + 1];
423 while (num >= 0 &&
comparer.Compare(val,
keys[num]) < 0)
void Sort(Span< T > keys, IComparer< T > comparer)
static void IntroSort(Span< T > keys, int depthLimit, Comparison< T > comparer)
static void SwapIfGreaterWithValues(Span< TKey > keys, Span< TValue > values, IComparer< TKey > comparer, int i, int j)
static void HeapSort(Span< TKey > keys, Span< TValue > values, IComparer< TKey > comparer)
void Sort(Span< TKey > keys, Span< TValue > values, IComparer< TKey > comparer)
static void HeapSort(Span< T > keys, Comparison< T > comparer)
int BinarySearch(T[] array, int index, int length, T value, IComparer< T > comparer)
static void Swap(Span< TKey > keys, Span< TValue > values, int i, int j)
static void IntrospectiveSort(Span< TKey > keys, Span< TValue > values, IComparer< TKey > comparer)
static readonly IArraySortHelper< T > s_defaultArraySortHelper
static void IntrospectiveSort(Span< T > keys, Comparison< T > comparer)
static IArraySortHelper< T > CreateArraySortHelper()
static int PickPivotAndPartition(Span< TKey > keys, Span< TValue > values, IComparer< TKey > comparer)
static void Sort(Span< T > keys, Comparison< T > comparer)
static void Swap(Span< T > a, int i, int j)
static void IntroSort(Span< TKey > keys, Span< TValue > values, int depthLimit, IComparer< TKey > comparer)
static IArraySortHelper< T > Default
static int PickPivotAndPartition(Span< T > keys, Comparison< T > comparer)
static void InsertionSort(Span< TKey > keys, Span< TValue > values, IComparer< TKey > comparer)
static void DownHeap(Span< TKey > keys, Span< TValue > values, int i, int n, IComparer< TKey > comparer)
static void SwapIfGreater(Span< T > keys, Comparison< T > comparer, int i, int j)
static IArraySortHelper< TKey, TValue > CreateArraySortHelper()
static void InsertionSort(Span< T > keys, Comparison< T > comparer)
static int InternalBinarySearch(T[] array, int index, int length, T value, IComparer< T > comparer)
static void DownHeap(Span< T > keys, int i, int n, Comparison< T > comparer)
static int Log2(uint value)
static void ThrowArgumentException_BadComparer(object comparer)
static void ThrowInvalidOperationException()
static unsafe object CreateInstanceForAnotherGenericParameter([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] RuntimeType type, RuntimeType genericParameter)