Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 401 for Numbers (0.19 sec)

  1. guava-tests/test/com/google/common/primitives/FloatsTest.java

            Long.MAX_VALUE
          };
    
      private static final float[] VALUES = Floats.concat(NUMBERS, new float[] {NaN});
    
      public void testHashCode() {
        for (float value : VALUES) {
          assertThat(Floats.hashCode(value)).isEqualTo(((Float) value).hashCode());
        }
      }
    
      public void testIsFinite() {
        for (float value : NUMBERS) {
          assertThat(Floats.isFinite(value))
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        assertEquals(42, queue.maximumSize);
        checkNatural(queue);
      }
    
      private static final ImmutableList<Integer> NUMBERS = ImmutableList.of(4, 8, 15, 16, 23, 42);
    
      public void testCreation_withContents() {
        MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create(NUMBERS);
        assertEquals(6, queue.size());
        assertEquals(11, queue.capacity());
        checkUnbounded(queue);
        checkNatural(queue);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Defaults.java

      private Defaults() {}
    
      private static final Double DOUBLE_DEFAULT = 0d;
      private static final Float FLOAT_DEFAULT = 0f;
    
      /**
       * Returns the default value of {@code type} as defined by JLS --- {@code 0} for numbers, {@code
       * false} for {@code boolean} and {@code '\0'} for {@code char}. For non-primitive types and
       * {@code void}, {@code null} is returned.
       */
      @SuppressWarnings("unchecked")
      @CheckForNull
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/MathBenchmarking.java

        BigInteger result = randomPositiveBigInteger(numBits);
        return RANDOM_SOURCE.nextBoolean() ? result : result.negate();
      }
    
      /**
       * Chooses a number in (-2^numBits, 2^numBits) at random, with density concentrated in numbers of
       * lower magnitude.
       */
      static BigInteger randomBigInteger(int numBits) {
        while (true) {
          if (RANDOM_SOURCE.nextBoolean()) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ArrayListMultimap.java

       * numbers of keys and values without resizing.
       *
       * <p>This method will soon be deprecated in favor of {@code
       * MultimapBuilder.hashKeys(expectedKeys).arrayListValues(expectedValuesPerKey).build()}.
       *
       * @param expectedKeys the expected number of distinct keys
       * @param expectedValuesPerKey the expected average number of values per key
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/OptionalTest.java

        Optional<Integer> optionalInt = getSomeOptionalInt();
        // Number value = optionalInt.or(0.5); // error
      }
    
      @SuppressWarnings("unused") // compilation test
      public void testSampleCodeError2() {
        FluentIterable<? extends Number> numbers = getSomeNumbers();
        Optional<? extends Number> first = numbers.first();
        // Number value = first.or(0.5); // error
      }
    
      @SuppressWarnings("unused") // compilation test
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/FloatsTest.java

            Long.MAX_VALUE
          };
    
      private static final float[] VALUES = Floats.concat(NUMBERS, new float[] {NaN});
    
      public void testHashCode() {
        for (float value : VALUES) {
          assertThat(Floats.hashCode(value)).isEqualTo(((Float) value).hashCode());
        }
      }
    
      public void testIsFinite() {
        for (float value : NUMBERS) {
          assertThat(Floats.isFinite(value))
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/BloomFilterTest.java

                BloomFilterStrategies.MURMUR128_MITZ_32);
    
        // Insert "numInsertions" even numbers into the BF.
        for (int i = 0; i < numInsertions * 2; i += 2) {
          bf.put(Integer.toString(i));
        }
        assertApproximateElementCountGuess(bf, numInsertions);
    
        // Assert that the BF "might" have all of the even numbers.
        for (int i = 0; i < numInsertions * 2; i += 2) {
          assertTrue(bf.mightContain(Integer.toString(i)));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/math/PairedStatsAccumulator.java

        double ySumOfSquaresOfDeltas = yStats.sumOfSquaresOfDeltas();
        checkState(xSumOfSquaresOfDeltas > 0.0);
        checkState(ySumOfSquaresOfDeltas > 0.0);
        // The product of two positive numbers can be zero if the multiplication underflowed. We
        // force a positive value by effectively rounding up to MIN_VALUE.
        double productOfSumsOfSquaresOfDeltas =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/OrderingTest.java

        Ordering<Number> numbers = Ordering.explicit((Number) 1);
        Ordering<Integer> integers = Ordering.explicit(1);
    
        // Like by like equals like
        Ordering<Number> a = numbers.compound(numbers);
    
        // The compound takes the more specific type of the two, regardless of order
    
        Ordering<Number> b = numbers.compound(objects);
        Ordering<Number> c = objects.compound(numbers);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
Back to top