Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for saturatedMultiply (0.15 sec)

  1. android/guava/src/com/google/common/collect/Collections2.java

              // We move to the next non-repeated element.
              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/Collections2.java

              // We move to the next non-repeated element.
              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/LongMath.java

        while (true) {
          switch (k) {
            case 0:
              return accum;
            case 1:
              return saturatedMultiply(accum, b);
            default:
              if ((k & 1) != 0) {
                accum = saturatedMultiply(accum, b);
              }
              k >>= 1;
              if (k > 0) {
                if (-FLOOR_SQRT_MAX_LONG > b | b > FLOOR_SQRT_MAX_LONG) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/math/LongMath.java

        while (true) {
          switch (k) {
            case 0:
              return accum;
            case 1:
              return saturatedMultiply(accum, b);
            default:
              if ((k & 1) != 0) {
                accum = saturatedMultiply(accum, b);
              }
              k >>= 1;
              if (k > 0) {
                if (-FLOOR_SQRT_MAX_LONG > b | b > FLOOR_SQRT_MAX_LONG) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s*",
                saturatedCast(valueOf(a).multiply(valueOf(b))),
                IntMath.saturatedMultiply(a, b));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testSaturatedPow() {
        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s*",
                saturatedCast(valueOf(a).multiply(valueOf(b))),
                IntMath.saturatedMultiply(a, b));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testSaturatedPow() {
        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/LongMathTest.java

          for (long b : ALL_LONG_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s*",
                saturatedCast(valueOf(a).multiply(valueOf(b))),
                LongMath.saturatedMultiply(a, b));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testSaturatedPow() {
        for (long a : ALL_LONG_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/ByteStreams.java

        // reading and so all of the bytes in each new allocated buffer are available for reading from
        // the stream.
        for (int bufSize = initialBufferSize;
            totalLen < MAX_ARRAY_LEN;
            bufSize = IntMath.saturatedMultiply(bufSize, bufSize < 4096 ? 4 : 2)) {
          byte[] buf = new byte[min(bufSize, MAX_ARRAY_LEN - totalLen)];
          bufs.add(buf);
          int off = 0;
          while (off < buf.length) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 29.7K bytes
    - Viewed (0)
Back to top