Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for saturatedAdd (0.21 sec)

  1. guava/src/com/google/common/cache/CacheStats.java

        return new CacheStats(
            saturatedAdd(hitCount, other.hitCount),
            saturatedAdd(missCount, other.missCount),
            saturatedAdd(loadSuccessCount, other.loadSuccessCount),
            saturatedAdd(loadExceptionCount, other.loadExceptionCount),
            saturatedAdd(totalLoadTime, other.totalLoadTime),
            saturatedAdd(evictionCount, other.evictionCount));
      }
    
      @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 12.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/CacheStats.java

        return new CacheStats(
            saturatedAdd(hitCount, other.hitCount),
            saturatedAdd(missCount, other.missCount),
            saturatedAdd(loadSuccessCount, other.loadSuccessCount),
            saturatedAdd(loadExceptionCount, other.loadExceptionCount),
            saturatedAdd(totalLoadTime, other.totalLoadTime),
            saturatedAdd(evictionCount, other.evictionCount));
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 12.6K bytes
    - Viewed (0)
  3. android/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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/AbstractNetwork.java

        };
      }
    
      @Override
      public int degree(N node) {
        if (isDirected()) {
          return IntMath.saturatedAdd(inEdges(node).size(), outEdges(node).size());
        } else {
          return IntMath.saturatedAdd(incidentEdges(node).size(), edgesConnecting(node, node).size());
        }
      }
    
      @Override
      public int inDegree(N node) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/AbstractDirectedNetworkConnections.java

                    : Sets.union(inEdgeMap.keySet(), outEdgeMap.keySet());
            return Iterators.unmodifiableIterator(incidentEdges.iterator());
          }
    
          @Override
          public int size() {
            return IntMath.saturatedAdd(inEdgeMap.size(), outEdgeMap.size() - selfLoopCount);
          }
    
          @Override
          public boolean contains(@CheckForNull Object obj) {
            return inEdgeMap.containsKey(obj) || outEdgeMap.containsKey(obj);
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 4.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/IntMath.java

       * {@code Integer.MAX_VALUE} or {@code Integer.MIN_VALUE} is returned, respectively.
       *
       * @since 20.0
       */
      public static int saturatedAdd(int a, int b) {
        return Ints.saturatedCast((long) a + b);
      }
    
      /**
       * Returns the difference of {@code a} and {@code b} unless it would overflow or underflow in
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java

        long waitMicros =
            storedPermitsToWaitTime(this.storedPermits, storedPermitsToSpend)
                + (long) (freshPermits * stableIntervalMicros);
    
        this.nextFreeTicketMicros = LongMath.saturatedAdd(nextFreeTicketMicros, waitMicros);
        this.storedPermits -= storedPermitsToSpend;
        return returnValue;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/IntMathTest.java

        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a, b, "s+", saturatedCast(valueOf(a).add(valueOf(b))), IntMath.saturatedAdd(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedSubtract() {
        for (int a : ALL_INTEGER_CANDIDATES) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Lists.java

        OnePlusArrayList(@ParametricNullness E first, E[] rest) {
          this.first = first;
          this.rest = checkNotNull(rest);
        }
    
        @Override
        public int size() {
          return IntMath.saturatedAdd(rest.length, 1);
        }
    
        @Override
        @ParametricNullness
        public E get(int index) {
          // check explicitly so the IOOBE will have the right message
          checkElementIndex(index, size());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 16:48:36 GMT 2024
    - 41.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/IntMathTest.java

        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a, b, "s+", saturatedCast(valueOf(a).add(valueOf(b))), IntMath.saturatedAdd(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedSubtract() {
        for (int a : ALL_INTEGER_CANDIDATES) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
Back to top