Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for isEvenLevel (0.19 sec)

  1. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

      }
    
      public void testIsEvenLevel() {
        assertTrue(MinMaxPriorityQueue.isEvenLevel(0));
        assertFalse(MinMaxPriorityQueue.isEvenLevel(1));
        assertFalse(MinMaxPriorityQueue.isEvenLevel(2));
        assertTrue(MinMaxPriorityQueue.isEvenLevel(3));
    
        assertFalse(MinMaxPriorityQueue.isEvenLevel((1 << 10) - 2));
        assertTrue(MinMaxPriorityQueue.isEvenLevel((1 << 10) - 1));
    
        int i = 1 << 29;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

      }
    
      public void testIsEvenLevel() {
        assertTrue(MinMaxPriorityQueue.isEvenLevel(0));
        assertFalse(MinMaxPriorityQueue.isEvenLevel(1));
        assertFalse(MinMaxPriorityQueue.isEvenLevel(2));
        assertTrue(MinMaxPriorityQueue.isEvenLevel(3));
    
        assertFalse(MinMaxPriorityQueue.isEvenLevel((1 << 10) - 2));
        assertTrue(MinMaxPriorityQueue.isEvenLevel((1 << 10) - 1));
    
        int i = 1 << 29;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

        removeAt(index);
        return value;
      }
    
      private Heap heapForIndex(int i) {
        return isEvenLevel(i) ? minHeap : maxHeap;
      }
    
      private static final int EVEN_POWERS_OF_TWO = 0x55555555;
      private static final int ODD_POWERS_OF_TWO = 0xaaaaaaaa;
    
      @VisibleForTesting
      static boolean isEvenLevel(int index) {
        int oneBased = ~~(index + 1); // for GWT
        checkState(oneBased > 0, "negative index");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/MinMaxPriorityQueue.java

        removeAt(index);
        return value;
      }
    
      private Heap heapForIndex(int i) {
        return isEvenLevel(i) ? minHeap : maxHeap;
      }
    
      private static final int EVEN_POWERS_OF_TWO = 0x55555555;
      private static final int ODD_POWERS_OF_TWO = 0xaaaaaaaa;
    
      @VisibleForTesting
      static boolean isEvenLevel(int index) {
        int oneBased = ~~(index + 1); // for GWT
        checkState(oneBased > 0, "negative index");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 34.1K bytes
    - Viewed (0)
Back to top