FloorLog2() статический приватный Метод

static private FloorLog2 ( int n ) : int
n int
Результат int
Пример #1
0
 internal static void IntrospectiveSort(T[] keys, int left, int length)
 {
     if (length < 2)
     {
         return;
     }
     GenericArraySortHelper <T> .IntroSort(keys, left, length + left - 1, 2 *IntrospectiveSortUtilities.FloorLog2(keys.Length));
 }
Пример #2
0
        internal static void IntrospectiveSort(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);
        }
Пример #3
0
        internal static void IntrospectiveSort(T[] keys, int left, int length)
        {
            Contract.Requires(keys != null);
            Contract.Requires(left >= 0);
            Contract.Requires(length >= 0);
            Contract.Requires(length <= keys.Length);
            Contract.Requires(length + left <= keys.Length);

            if (length < 2)
            {
                return;
            }

            IntroSort(keys, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
        }
Пример #4
0
        internal static void IntrospectiveSort(T[] keys, int left, int length)
        {
            Debug.Assert(keys != null);
            Debug.Assert(left >= 0);
            Debug.Assert(length >= 0);
            Debug.Assert(length <= keys.Length);
            Debug.Assert(length + left <= keys.Length);

            if (length < 2)
            {
                return;
            }

            IntroSort(keys, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
        }
Пример #5
0
 // Token: 0x06003A3C RID: 14908 RVA: 0x000DCF9B File Offset: 0x000DB19B
 internal static void IntrospectiveSort(TKey[] keys, TValue[] values, int left, int length, IComparer <TKey> comparer)
 {
     if (length < 2)
     {
         return;
     }
     ArraySortHelper <TKey, TValue> .IntroSort(keys, values, left, length + left - 1, 2 *IntrospectiveSortUtilities.FloorLog2(keys.Length), comparer);
 }