- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for binarySearch (0.21 sec)
-
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) -
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) -
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) -
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) -
src/test/java/jcifs/tests/EnumTest.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Thu Jan 05 13:09:03 UTC 2023 - 25.5K bytes - Viewed (0) -
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) -
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) -
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) -
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)