- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for BinarySearch (0.07 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]) })
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 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 {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Apr 02 11:39:58 UTC 2024 - 9K 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() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 4K bytes - Viewed (0) -
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) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 9.2K bytes - Viewed (0) -
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) -
src/test/java/jcifs/tests/NamingTest.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sat Jun 06 10:48:05 UTC 2020 - 7K bytes - Viewed (0)