Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 20 for binarySearch (0.21 sec)

  1. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

      /**
       * Returns true if the [codePoint] was applied successfully. Returns false if it was disallowed.
       */
      fun map(
        codePoint: Int,
        sink: BufferedSink,
      ): Boolean {
        val index =
          mappings.binarySearch {
            when {
              it.sourceCodePoint1 < codePoint -> -1
              it.sourceCodePoint0 > codePoint -> 1
              else -> 0
            }
          }
    
        // Code points must be in 0..0x10ffff.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/tests/NamingTest.java

            ByteBuffer buf = ByteBuffer.allocate(128);
            Arrays.sort(excludes);
            for ( int i = 128; i < 255; i++ ) {
                int idx = Arrays.binarySearch(excludes, i);
                if ( idx < 0 || excludes[ idx ] == i ) {
                    continue;
                }
    
                if ( i == 240 ) {
                    continue;
                }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sat Jun 06 10:48:05 UTC 2020
    - 7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Ordering.java

        return true;
      }
    
      /**
       * {@link Collections#binarySearch(List, Object, Comparator) Searches} {@code sortedList} for
       * {@code key} using the binary search algorithm. The list must be sorted using this ordering.
       *
       * @param sortedList the list to be searched
       * @param key the key to be searched for
       * @deprecated Use {@link Collections#binarySearch(List, Object, Comparator)} directly.
       */
      @Deprecated
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/OrderingTest.java

          for (int i = 0; i < strictlyOrderedList.size(); i++) {
            assertEquals(i, ordering.binarySearch(strictlyOrderedList, strictlyOrderedList.get(i)));
          }
          List<T> newList = Lists.newArrayList(strictlyOrderedList);
          T valueNotInList = newList.remove(1);
          assertEquals(-2, ordering.binarySearch(newList, valueNotInList));
        }
    
        void testSortedCopy() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/OrderingTest.java

          for (int i = 0; i < strictlyOrderedList.size(); i++) {
            assertEquals(i, ordering.binarySearch(strictlyOrderedList, strictlyOrderedList.get(i)));
          }
          List<T> newList = Lists.newArrayList(strictlyOrderedList);
          T valueNotInList = newList.remove(1);
          assertEquals(-2, ordering.binarySearch(newList, valueNotInList));
        }
    
        void testSortedCopy() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/tests/EnumTest.java

                    }
    
                    String[] found = f.list();
                    Arrays.sort(found);
    
                    for ( int i = 0; i < n; i++ ) {
                        Assert.assertTrue(Arrays.binarySearch(found, String.format("%s%d.tmp", prefix, i)) >= 0);
                    }
                }
                finally {
                    f.delete();
                }
            }
    
        }
    
    
        @Test
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Thu Jan 05 13:09:03 UTC 2023
    - 25.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/base/CharMatcher.java

              checkArgument(rangeEnds[i] < rangeStarts[i + 1]);
            }
          }
        }
    
        @Override
        public boolean matches(char c) {
          int index = Arrays.binarySearch(rangeStarts, c);
          if (index >= 0) {
            return true;
          } else {
            index = ~index - 1;
            return index >= 0 && c <= rangeEnds[index];
          }
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 53.9K bytes
    - Viewed (0)
  8. api/go1.21.txt

    pkg runtime, method (*Pinner) Pin(interface{}) #46787
    pkg runtime, method (*Pinner) Unpin() #46787
    pkg runtime, type PanicNilError struct #25448
    pkg runtime, type Pinner struct #46787
    pkg slices, func BinarySearch[$0 interface{ ~[]$1 }, $1 cmp.Ordered]($0, $1) (int, bool) #60091
    pkg slices, func BinarySearchFunc[$0 interface{ ~[]$1 }, $1 interface{}, $2 interface{}]($0, $2, func($1, $2) int) (int, bool) #60091
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 07 09:39:17 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

                Arrays.copyOf(sortedElements, IntMath.saturatedAdd(length, length / 2 + 1));
          }
          int[] sortedCounts = new int[sortedElements.length];
          for (int i = 0; i < length; i++) {
            int index = Arrays.binarySearch(sortedElements, 0, uniques, elements[i], comparator);
            if (counts[i] >= 0) {
              sortedCounts[index] += counts[i];
            } else {
              sortedCounts[index] = ~counts[i];
            }
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

                }
                // requireNonNull is safe because the first `size` elements have been filled in.
                // We're careful to put only K instances in.
                int index =
                    Arrays.binarySearch((K[]) sortedKeys, (K) requireNonNull(keys[i]), comparator);
                sortedValues[index] = requireNonNull(values[i]);
              }
              return new ImmutableSortedMap<K, V>(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 53K bytes
    - Viewed (0)
Back to top