- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 392 for ints (0.03 sec)
-
android/guava/src/com/google/common/primitives/Ints.java
public static int constrainToRange(int value, int min, int max) { checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max); return Math.min(Math.max(value, min), max); } /** * Returns the values from each provided array combined into a single array. For example, {@code * concat(new int[] {a, b}, new int[] {}, new int[] {c}} returns the array {@code {a, b, c}}. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 31K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/IntsTest.java
assertThat(Ints.constrainToRange((int) 1, (int) 0, (int) 5)).isEqualTo((int) 1); assertThat(Ints.constrainToRange((int) 1, (int) 1, (int) 5)).isEqualTo((int) 1); assertThat(Ints.constrainToRange((int) 1, (int) 3, (int) 5)).isEqualTo((int) 3); assertThat(Ints.constrainToRange((int) 0, (int) -5, (int) -1)).isEqualTo((int) -1); assertThat(Ints.constrainToRange((int) 5, (int) 2, (int) 2)).isEqualTo((int) 2); assertThrows(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 29.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/IntArrayAsListTest.java
/** * Test suite covering {@link Ints#asList(int[])}. * * @author Kevin Bourrillion */ @GwtCompatible(emulated = true) @SuppressWarnings("cast") // redundant casts are intentional and harmless public class IntArrayAsListTest extends TestCase { private static List<Integer> asList(Integer[] values) { int[] temp = new int[values.length]; for (int i = 0; i < values.length; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Jun 01 09:32:35 UTC 2023 - 5.7K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java
for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += IntMath.log10(positive[j], mode); } return tmp; } @Benchmark int sqrt(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += IntMath.sqrt(positive[j], mode); } return tmp; } @Benchmark int divide(int reps) { int tmp = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Hashing.java
* hereby disclaims copyright to this source code. */ static int smear(int hashCode) { return (int) (C2 * Integer.rotateLeft((int) (hashCode * C1), 15)); } static int smearedHash(@CheckForNull Object o) { return smear((o == null) ? 0 : o.hashCode()); } private static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO; static int closedTableSize(int expectedEntries, double loadFactor) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/Hashing.java
* hereby disclaims copyright to this source code. */ static int smear(int hashCode) { return (int) (C2 * Integer.rotateLeft((int) (hashCode * C1), 15)); } static int smearedHash(@CheckForNull Object o) { return smear((o == null) ? 0 : o.hashCode()); } private static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO; static int closedTableSize(int expectedEntries, double loadFactor) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
requests.set(0); misses.set(0); } @Benchmark int time(int reps) { int dummy = 0; for (int i = 0; i < reps; i++) { dummy += cache.getUnchecked(nextRandomKey()); } requests.addAndGet(reps); return dummy; } private int nextRandomKey() { int a = random.nextInt(max); /*
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.4K bytes - Viewed (0) -
build-logic-commons/basics/src/main/kotlin/gradlebuild.minify.gradle.kts
"fastutil" to setOf( // For Java compilation incremental analysis "it.unimi.dsi.fastutil.ints.IntOpenHashSet", "it.unimi.dsi.fastutil.ints.IntSets", // For the embedded Kotlin compiler "it.unimi.dsi.fastutil.ints.Int2ObjectMap", "it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap", "it.unimi.dsi.fastutil.objects.Object2IntMap",
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Sat Sep 30 16:17:28 UTC 2023 - 4.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CompactHashing.java
* current hashtable size. */ static int newCapacity(int mask) { return ((mask < 32) ? 4 : 2) * (mask + 1); } /** Returns the hash prefix given the current mask. */ static int getHashPrefix(int value, int mask) { return value & ~mask; } /** Returns the index, or 0 if the entry is "null". */ static int getNext(int entry, int mask) { return entry & mask; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 15:34:52 UTC 2024 - 7.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableMultiset.java
private final transient int size; @LazyInit @CheckForNull private transient ImmutableSet<E> elementSet; RegularImmutableMultiset(ObjectCountHashMap<E> contents) { this.contents = contents; long size = 0; for (int i = 0; i < contents.size(); i++) { size += contents.getValue(i); } this.size = Ints.saturatedCast(size); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Nov 30 21:54:06 UTC 2023 - 4.1K bytes - Viewed (0)