Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for mod (0.14 sec)

  1. android/guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += IntMath.pow(positive[j], exponent[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int mod(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.mod(ints[j], positive[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int gCD(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/LongMath.java

        return increment ? div + signum : div;
      }
    
      /**
       * Returns {@code x mod m}, a non-negative value less than {@code m}. This differs from {@code x %
       * m}, which might be negative.
       *
       * <p>For example:
       *
       * <pre>{@code
       * mod(7, 4) == 3
       * mod(-7, 4) == 1
       * mod(-1, 4) == 3
       * mod(-8, 4) == 0
       * mod(8, 4) == 0
       * }</pre>
       *
       * @throws ArithmeticException if {@code m <= 0}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/IntMath.java

        return increment ? div + signum : div;
      }
    
      /**
       * Returns {@code x mod m}, a non-negative value less than {@code m}. This differs from {@code x %
       * m}, which might be negative.
       *
       * <p>For example:
       *
       * <pre>{@code
       * mod(7, 4) == 3
       * mod(-7, 4) == 1
       * mod(-1, 4) == 3
       * mod(-8, 4) == 0
       * mod(8, 4) == 0
       * }</pre>
       *
       * @throws ArithmeticException if {@code m <= 0}
    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)
  4. guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += IntMath.pow(positive[j], exponent[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int mod(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.mod(ints[j], positive[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int gCD(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/UnsignedInteger.java

        return fromIntBits(UnsignedInts.divide(value, checkNotNull(val).value));
      }
    
      /**
       * Returns this mod {@code val}.
       *
       * @throws ArithmeticException if {@code val} is zero
       * @since 14.0
       */
      public UnsignedInteger mod(UnsignedInteger val) {
        return fromIntBits(UnsignedInts.remainder(value, checkNotNull(val).value));
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 23 18:45:50 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/UnsignedIntegerTest.java

              int expected = aUnsigned.bigIntegerValue().mod(bUnsigned.bigIntegerValue()).intValue();
              UnsignedInteger unsignedRem = aUnsigned.mod(bUnsigned);
              assertThat(unsignedRem.intValue()).isEqualTo(expected);
            }
          }
        }
      }
    
      public void testModByZero() {
        for (int a : TEST_INTS) {
          try {
            UnsignedInteger.fromIntBits(a).mod(UnsignedInteger.ZERO);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/Bytes.java

      }
    
      /**
       * Performs a right rotation of {@code array} of "distance" places, so that the first element is
       * moved to index "distance", and the element at index {@code i} ends up at index {@code (distance
       * + i) mod array.length}. This is equivalent to {@code Collections.rotate(Bytes.asList(array),
       * distance)}, but is somewhat faster.
       *
       * <p>The provided "distance" may be negative, which will rotate left.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/MultisetsTest.java

      }
    
      @SuppressWarnings("deprecation")
      public void testUnmodifiableMultisetShortCircuit() {
        Multiset<String> mod = HashMultiset.create();
        Multiset<String> unmod = Multisets.unmodifiableMultiset(mod);
        assertNotSame(mod, unmod);
        assertSame(unmod, Multisets.unmodifiableMultiset(unmod));
        ImmutableMultiset<String> immutable = ImmutableMultiset.of("a", "a", "b", "a");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/MapsTest.java

      @GwtIncompatible // NavigableMap
      public void testUnmodifiableNavigableMap() {
        TreeMap<Integer, String> mod = Maps.newTreeMap();
        mod.put(1, "one");
        mod.put(2, "two");
        mod.put(3, "three");
    
        NavigableMap<Integer, String> unmod = unmodifiableNavigableMap(mod);
    
        /* unmod is a view. */
        mod.put(4, "four");
        assertEquals("four", unmod.get(4));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 67.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/MapsTest.java

      @GwtIncompatible // NavigableMap
      public void testUnmodifiableNavigableMap() {
        TreeMap<Integer, String> mod = Maps.newTreeMap();
        mod.put(1, "one");
        mod.put(2, "two");
        mod.put(3, "three");
    
        NavigableMap<Integer, String> unmod = unmodifiableNavigableMap(mod);
    
        /* unmod is a view. */
        mod.put(4, "four");
        assertEquals("four", unmod.get(4));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 64.3K bytes
    - Viewed (0)
Back to top