- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for binarySearch (0.19 sec)
-
okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt
assertEquals(4, binarySearch(0, 5) { index -> 9.compareTo(table[index]) }) // Search for misses. assertEquals(-1, binarySearch(0, 5) { index -> 0.compareTo(table[index]) }) assertEquals(-2, binarySearch(0, 5) { index -> 2.compareTo(table[index]) }) assertEquals(-3, binarySearch(0, 5) { index -> 4.compareTo(table[index]) })
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 8.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt
val target = (codePoint and 0x1fff80) shr 7 val offset = binarySearch( position = 0, limit = sections.length / 4, ) { index -> val entryIndex = index * 4 val b0b1 = sections.read14BitInt(entryIndex) return@binarySearch target.compareTo(b0b1) } return when {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Tue Apr 02 11:39:58 GMT 2024 - 9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/SortedLists.java
* algorithm. * * <p>Equivalent to {@link #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, * KeyAbsentBehavior)} using {@link Ordering#natural}. */ @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989 public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior,
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 21:19:52 GMT 2024 - 10.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java
} } catch (NullPointerException | ClassCastException e) { return false; } } private int unsafeBinarySearch(Object key) throws ClassCastException { return Collections.binarySearch(elements, key, unsafeComparator()); } @Override boolean isPartialView() { return elements.isPartialView(); } @Override int copyIntoArray(@Nullable Object[] dst, int offset) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
// will look like: [foo, bar, com], [bar, com], [com]. The longest matching rule wins. var exactMatch: String? = null for (i in domainLabelsUtf8Bytes.indices) { val rule = publicSuffixListBytes.binarySearch(domainLabelsUtf8Bytes, i) if (rule != null) { exactMatch = rule break } } // In theory, wildcard rules are not restricted to having the wildcard in the leftmost position.
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableRangeMap.java
return this; } int lowerIndex = SortedLists.binarySearch( ranges, Range::upperBound, range.lowerBound, KeyPresentBehavior.FIRST_AFTER, KeyAbsentBehavior.NEXT_HIGHER); int upperIndex = SortedLists.binarySearch( ranges, Range::lowerBound, range.upperBound,
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 14.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/SortedListsTest.java
for (int key = 0; key <= 10; key++) { assertModelAgrees( LIST_WITHOUT_DUPS, key, SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior), presentBehavior, absentBehavior); } } } } public void testWithDups() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Feb 19 20:34:55 GMT 2024 - 4.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/SortedListsTest.java
for (int key = 0; key <= 10; key++) { assertModelAgrees( LIST_WITHOUT_DUPS, key, SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior), presentBehavior, absentBehavior); } } } } public void testWithDups() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Feb 19 20:34:55 GMT 2024 - 4.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableRangeMap.java
return this; } int lowerIndex = SortedLists.binarySearch( ranges, Range::upperBound, range.lowerBound, KeyPresentBehavior.FIRST_AFTER, KeyAbsentBehavior.NEXT_HIGHER); int upperIndex = SortedLists.binarySearch( ranges, Range::lowerBound, range.upperBound,
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 14.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableRangeSet.java
fromIndex = SortedLists.binarySearch( ranges, Range::upperBound, range.lowerBound, KeyPresentBehavior.FIRST_AFTER, KeyAbsentBehavior.NEXT_HIGHER); } else { fromIndex = 0; } int toIndex; if (range.hasUpperBound()) { toIndex = SortedLists.binarySearch( ranges,
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 26.9K bytes - Viewed (0)