Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for Delta (0.35 sec)

  1. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

                {
                  int delta = random.nextInt(6); // [0, 5]
                  int oldValue = multiset.remove(key, delta);
                  deltas[keyIndex] -= Math.min(delta, oldValue);
                  break;
                }
              case REMOVE_EXACTLY:
                {
                  int delta = random.nextInt(5); // [0, 4]
                  if (multiset.removeExactly(key, delta)) {
                    deltas[keyIndex] -= delta;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 5.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Count.java

      private int value;
    
      Count(int value) {
        this.value = value;
      }
    
      public int get() {
        return value;
      }
    
      public void add(int delta) {
        value += delta;
      }
    
      public int addAndGet(int delta) {
        return value += delta;
      }
    
      public void set(int newValue) {
        value = newValue;
      }
    
      public int getAndSet(int newValue) {
        int result = value;
        value = newValue;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Aug 05 00:40:25 GMT 2021
    - 1.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

      }
    
      /**
       * Adds {@code delta} to the value currently associated with {@code key}, and returns the new
       * value.
       */
      @CanIgnoreReturnValue
      public long addAndGet(K key, long delta) {
        outer:
        while (true) {
          AtomicLong atomic = map.get(key);
          if (atomic == null) {
            atomic = map.putIfAbsent(key, new AtomicLong(delta));
            if (atomic == null) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java

       *
       * @param i the index
       * @param delta the value to add
       * @return the previous value
       */
      @CanIgnoreReturnValue
      public final double getAndAdd(int i, double delta) {
        while (true) {
          long current = longs.get(i);
          double currentVal = longBitsToDouble(current);
          double nextVal = currentVal + delta;
          long next = doubleToRawLongBits(nextVal);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/HashTestUtils.java

            while (!diff) {
              int delta = (1 << i) | (1 << j);
              int key1 = rand.nextInt();
              // apply delta
              int key2 = key1 ^ delta;
    
              // get hashes
              int hash1 = function.hashInt(key1).asInt();
              int hash2 = function.hashInt(key2).asInt();
    
              // this 2-bit candidate delta is not a characteristic
              // if deltas are different
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/math/StatsBenchmark.java

            double mean = meanAlgorithm.mean(values);
            double sumOfSquaresOfDeltas = 0.0;
            for (double value : values) {
              double delta = value - mean;
              sumOfSquaresOfDeltas += delta * delta;
            }
            return new MeanAndVariance(mean, sumOfSquaresOfDeltas / values.length);
          }
        },
        KAHAN {
          @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

      }
    
      private static Function<Integer, Integer> add(final int delta) {
        return new Function<Integer, Integer>() {
          @Override
          public Integer apply(Integer input) {
            return input + delta;
          }
        };
      }
    
      private static AsyncCallable<Integer> asyncAdd(
          final ListenableFuture<Integer> future, final int delta, final Executor executor) {
        return new AsyncCallable<Integer>() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

      }
    
      private static Function<Integer, Integer> add(final int delta) {
        return new Function<Integer, Integer>() {
          @Override
          public Integer apply(Integer input) {
            return input + delta;
          }
        };
      }
    
      private static AsyncCallable<Integer> asyncAdd(
          final ListenableFuture<Integer> future, final int delta, final Executor executor) {
        return new AsyncCallable<Integer>() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/math/MathTesting.java

                Long.MIN_VALUE,
                Long.MAX_VALUE)) {
          for (double delta : Doubles.asList(0.0, 1.0, 2.0)) {
            integralBuilder.addAll(Doubles.asList(d + delta, d - delta, -d - delta, -d + delta));
          }
          for (double delta : Doubles.asList(0.01, 0.1, 0.25, 0.499, 0.5, 0.501, 0.7, 0.8)) {
            double x = d + delta;
            if (x != Math.round(x)) {
              fractionalBuilder.add(x);
            }
          }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

          // This range is [-5, 4] - slight negative bias so we often hit zero, which brings the
          // auto-removal of zeroes into play.
          int delta = random.nextInt(10) - 5;
          blah += delta;
          if (delta >= 0) {
            multiset.add(key, delta);
          } else {
            multiset.remove(key, -delta);
          }
        }
        return blah;
      }
    
      private enum MultisetSupplier {
        CONCURRENT_HASH_MULTISET() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 16.6K bytes
    - Viewed (0)
Back to top