Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,093 for long (0.17 sec)

  1. android/guava/src/com/google/common/primitives/Longs.java

       * value).hashCode()}.
       *
       * <p>This method always return the value specified by {@link Long#hashCode()} in java, which
       * might be different from {@code ((Long) value).hashCode()} in GWT because {@link
       * Long#hashCode()} in GWT does not obey the JRE contract.
       *
       * <p><b>Java 8+ users:</b> use {@link Long#hashCode(long)} instead.
       *
       * @param value a primitive {@code long} value
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 28.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/DoubleMath.java

      @GwtIncompatible // #roundIntermediate
      public static long roundToLong(double x, RoundingMode mode) {
        double z = roundIntermediate(x, mode);
        checkInRangeForRoundingInputs(
            MIN_LONG_AS_DOUBLE - z < 1.0 & z < MAX_LONG_AS_DOUBLE_PLUS_ONE, x, mode);
        return (long) z;
      }
    
      private static final double MIN_LONG_AS_DOUBLE = -0x1p63;
      /*
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/LongMathTest.java

        assertMean(0, 0, 0);
        assertMean(-1, -1, -1);
        assertMean(Long.MIN_VALUE, Long.MIN_VALUE, Long.MIN_VALUE);
        assertMean(Long.MAX_VALUE, Long.MAX_VALUE, Long.MAX_VALUE);
    
        // Exhaustive checks
        for (long x : ALL_LONG_CANDIDATES) {
          for (long y : ALL_LONG_CANDIDATES) {
            assertMean(x, y);
          }
        }
      }
    
      /** Helper method that asserts the arithmetic mean of x and y is equal to the expectedMean. */
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/LongArrayAsListTest.java

          Long[] suffix = {(long) 86, (long) 99};
          Long[] all = concat(concat(prefix, elements), suffix);
          return asList(all).subList(2, elements.length + 2);
        }
      }
    
      private static Long[] concat(Long[] left, Long[] right) {
        Long[] result = new Long[left.length + right.length];
        System.arraycopy(left, 0, result, 0, left.length);
        System.arraycopy(right, 0, result, left.length, right.length);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/UnsignedLongs.java

      private UnsignedLongs() {}
    
      public static final long MAX_VALUE = -1L; // Equivalent to 2^64 - 1
    
      /**
       * A (self-inverse) bijection which converts the ordering on unsigned longs to the ordering on
       * longs, that is, {@code a <= b} as unsigned longs if and only if {@code flip(a) <= flip(b)} as
       * signed longs.
       */
      private static long flip(long a) {
        return a ^ Long.MIN_VALUE;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

      }
    
      public void testDivideByZeroThrows() {
        for (long a : TEST_LONGS) {
          try {
            UnsignedLong.fromLongBits(a).dividedBy(UnsignedLong.ZERO);
            fail("Expected ArithmeticException");
          } catch (ArithmeticException expected) {
          }
        }
      }
    
      public void testMod() {
        for (long a : TEST_LONGS) {
          for (long b : TEST_LONGS) {
            if (b != 0) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java

        public abstract long gcdLong(long a, long b);
    
        public abstract boolean noAddOverflow(int a, int b);
    
        public abstract boolean noAddOverflow(long a, long b);
    
        public abstract boolean noMulOverflow(int a, int b);
    
        public abstract boolean noMulOverflow(long a, long b);
      }
    
      private final int[] factorials = new int[ARRAY_SIZE];
      private final int[][] binomials = new int[ARRAY_SIZE][2];
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java

        long[] longArray = new long[len];
        for (int i = 0; i < len; i++) {
          longArray[i] = doubleToRawLongBits(array[i]);
        }
        this.longs = new AtomicLongArray(longArray);
      }
    
      /**
       * Returns the length of the array.
       *
       * @return the length of the array
       */
      public final int length() {
        return longs.length();
      }
    
      /**
       * Gets the current value at position {@code i}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

       */
      public long sum() {
        long sum = 0L;
        for (AtomicLong value : map.values()) {
          sum = sum + value.get();
        }
        return sum;
      }
    
      @LazyInit @CheckForNull private transient Map<K, Long> asMap;
    
      /** Returns a live, read-only view of the map backing this {@code AtomicLongMap}. */
      public Map<K, Long> asMap() {
        Map<K, Long> result = asMap;
    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)
  10. android/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java

          tmp += UnsignedLongs.divide(longs[j], divisors[j]);
        }
        return tmp;
      }
    
      @Benchmark
      long remainder(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += UnsignedLongs.remainder(longs[j], divisors[j]);
        }
        return tmp;
      }
    
      @Benchmark
      long parseUnsignedLong(int reps) {
        long tmp = 0;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.3K bytes
    - Viewed (0)
Back to top