Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 298 for Doubles (0.07 sec)

  1. guava/src/com/google/common/primitives/Doubles.java

       * value).hashCode()}.
       *
       * <p><b>Java 8+ users:</b> use {@link Double#hashCode(double)} instead.
       *
       * @param value a primitive {@code double} value
       * @return a hash code for the value
       */
      public static int hashCode(double value) {
        return ((Double) value).hashCode();
        // TODO(kevinb): do it this way when we can (GWT problem):
        // long bits = Double.doubleToLongBits(value);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 15:52:18 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/primitives/Doubles.java

       * value).hashCode()}.
       *
       * <p><b>Java 8+ users:</b> use {@link Double#hashCode(double)} instead.
       *
       * @param value a primitive {@code double} value
       * @return a hash code for the value
       */
      public static int hashCode(double value) {
        return ((Double) value).hashCode();
        // TODO(kevinb): do it this way when we can (GWT problem):
        // long bits = Double.doubleToLongBits(value);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/DoublesTest.java

        assertThat(Doubles.constrainToRange((double) 1, (double) 1, (double) 5)).isEqualTo((double) 1);
        assertThat(Doubles.constrainToRange((double) 1, (double) 3, (double) 5)).isEqualTo((double) 3);
        assertThat(Doubles.constrainToRange((double) 0, (double) -5, (double) -1))
            .isEqualTo((double) -1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 32.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/DoublesTest.java

        assertThat(Doubles.constrainToRange((double) 1, (double) 1, (double) 5)).isEqualTo((double) 1);
        assertThat(Doubles.constrainToRange((double) 1, (double) 3, (double) 5)).isEqualTo((double) 3);
        assertThat(Doubles.constrainToRange((double) 0, (double) -5, (double) -1))
            .isEqualTo((double) -1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 32.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/QuantilesTest.java

       * each other or identical non-finite values.
       */
      private static final Correspondence<Double, Double> QUANTILE_CORRESPONDENCE =
          Correspondence.from(
              new BinaryPredicate<Double, Double>() {
                @Override
                public boolean apply(@Nullable Double actual, @Nullable Double expected) {
                  // Test for equality to allow non-finite values to match; otherwise, use the finite
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 29.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/MathTesting.java

      }
    
      static final ImmutableSet<Double> INTEGRAL_DOUBLE_CANDIDATES;
      static final ImmutableSet<Double> FRACTIONAL_DOUBLE_CANDIDATES;
      static final Iterable<Double> INFINITIES =
          Doubles.asList(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY);
      static final Iterable<Double> FINITE_DOUBLE_CANDIDATES;
      static final Iterable<Double> POSITIVE_FINITE_DOUBLE_CANDIDATES;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 11.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/MathTesting.java

      }
    
      static final ImmutableSet<Double> INTEGRAL_DOUBLE_CANDIDATES;
      static final ImmutableSet<Double> FRACTIONAL_DOUBLE_CANDIDATES;
      static final Iterable<Double> INFINITIES =
          Doubles.asList(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY);
      static final Iterable<Double> FINITE_DOUBLE_CANDIDATES;
      static final Iterable<Double> POSITIVE_FINITE_DOUBLE_CANDIDATES;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 11.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java

        BigDecimal maxDoubleAsBD = new BigDecimal(Double.MAX_VALUE);
        new RoundToDoubleTester(maxDoubleAsBD).setExpectation(Double.MAX_VALUE, values()).test();
      }
    
      public void testRoundToDouble_maxDoublePlusOne() {
        BigDecimal maxDoubleAsBD = new BigDecimal(Double.MAX_VALUE).add(BigDecimal.ONE);
        new RoundToDoubleTester(maxDoubleAsBD)
            .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/math/Quantiles.java

        }
      }
    
      private static double[] longsToDoubles(long[] longs) {
        int len = longs.length;
        double[] doubles = new double[len];
        for (int i = 0; i < len; i++) {
          doubles[i] = longs[i];
        }
        return doubles;
      }
    
      private static double[] intsToDoubles(int[] ints) {
        int len = ints.length;
        double[] doubles = new double[len];
        for (int i = 0; i < len; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 17:02:53 UTC 2023
    - 29.9K bytes
    - Viewed (0)
  10. guava/src/com/google/common/math/PairedStatsAccumulator.java

          return LinearTransformation.vertical(xStats.mean());
        }
      }
    
      private double ensurePositive(double value) {
        if (value > 0.0) {
          return value;
        } else {
          return Double.MIN_VALUE;
        }
      }
    
      private static double ensureInUnitRange(double value) {
        return Doubles.constrainToRange(value, -1.0, 1.0);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 17:02:53 UTC 2023
    - 10.3K bytes
    - Viewed (0)
Back to top