- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for saturatedAdd (0.04 sec)
-
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(),
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 21 15:40:45 UTC 2025 - 36.8K bytes - Viewed (0) -
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) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 07 15:57:03 UTC 2025 - 11.5K bytes - Viewed (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.
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Nov 03 21:01:09 UTC 2025 - 46.8K bytes - Viewed (0)