- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for saturatedAdd (0.04 seconds)
-
guava/src/com/google/common/graph/AbstractBaseGraph.java
} @Override public int degree(N node) { if (isDirected()) { return IntMath.saturatedAdd(predecessors(node).size(), successors(node).size()); } else { Set<N> neighbors = adjacentNodes(node); int selfLoopCount = (allowsSelfLoops() && neighbors.contains(node)) ? 1 : 0; return IntMath.saturatedAdd(neighbors.size(), selfLoopCount); } } @Override public int inDegree(N node) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 07 15:57:03 GMT 2025 - 11.5K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Streams.java
isParallel |= stream.isParallel(); Spliterator<? extends T> splitr = stream.spliterator(); splitrsBuilder.add(splitr); characteristics &= splitr.characteristics(); estimatedSize = LongMath.saturatedAdd(estimatedSize, splitr.estimateSize()); } return StreamSupport.stream( CollectSpliterators.flatMap( splitrsBuilder.build().spliterator(),
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 21 15:40:45 GMT 2025 - 36.8K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Sets.java
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.CollectPreconditions.checkNonnegative; import static com.google.common.math.IntMath.saturatedAdd; import static java.lang.Math.max; import static java.lang.Math.min; import static java.util.Arrays.asList; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible;
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 18:35:44 GMT 2025 - 81.6K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Multisets.java
} @Override public boolean isEmpty() { return multiset1.isEmpty() && multiset2.isEmpty(); } @Override public int size() { return IntMath.saturatedAdd(multiset1.size(), multiset2.size()); } @Override public int count(@Nullable Object element) { return multiset1.count(element) + multiset2.count(element); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 18:35:44 GMT 2025 - 41.3K bytes - Click Count (0) -
guava/src/com/google/common/collect/Multisets.java
} @Override public boolean isEmpty() { return multiset1.isEmpty() && multiset2.isEmpty(); } @Override public int size() { return IntMath.saturatedAdd(multiset1.size(), multiset2.size()); } @Override public int count(@Nullable Object element) { return multiset1.count(element) + multiset2.count(element); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 18:35:44 GMT 2025 - 41.2K bytes - Click Count (0) -
guava/src/com/google/common/math/LongMath.java
* * @since 20.0 */ // Whenever both tests are cheap and functional, it's faster to use &, | instead of &&, || @SuppressWarnings("ShortCircuitBoolean") public static long saturatedAdd(long a, long b) { long naiveSum = a + b; if ((a ^ b) < 0 | (a ^ naiveSum) >= 0) { // If a and b have different signs or a has the same sign as the result then there was no // overflow, return.
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Nov 03 21:01:09 GMT 2025 - 46.8K bytes - Click Count (0)