Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for nonnegative (0.38 sec)

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

      private static final long[] nonnegative = new long[ARRAY_SIZE];
      private static final long[] longs = new long[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          exponents[i] = randomExponent();
          positive[i] = randomPositiveBigInteger(Long.SIZE - 1).longValue();
          nonnegative[i] = randomNonNegativeBigInteger(Long.SIZE - 1).longValue();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

      private static int[] factorial = new int[ARRAY_SIZE];
      private static int[] binomial = new int[ARRAY_SIZE];
      private static final int[] positive = new int[ARRAY_SIZE];
      private static final int[] nonnegative = new int[ARRAY_SIZE];
      private static final int[] ints = new int[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          exponent[i] = randomExponent();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ExplicitOrdering.java

      }
    
      ExplicitOrdering(ImmutableMap<T, Integer> rankMap) {
        this.rankMap = rankMap;
      }
    
      @Override
      public int compare(T left, T right) {
        return rank(left) - rank(right); // safe because both are nonnegative
      }
    
      private int rank(T value) {
        Integer rank = rankMap.get(value);
        if (rank == null) {
          throw new IncomparableValueException(value);
        }
        return rank;
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 20 14:22:42 UTC 2021
    - 2K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ExplicitOrdering.java

      }
    
      ExplicitOrdering(ImmutableMap<T, Integer> rankMap) {
        this.rankMap = rankMap;
      }
    
      @Override
      public int compare(T left, T right) {
        return rank(left) - rank(right); // safe because both are nonnegative
      }
    
      private int rank(T value) {
        Integer rank = rankMap.get(value);
        if (rank == null) {
          throw new IncomparableValueException(value);
        }
        return rank;
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 20 14:22:42 UTC 2021
    - 2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/math/IntMath.java

          int delta = a - b; // can't overflow, since a and b are nonnegative
    
          int minDeltaOrZero = delta & (delta >> (Integer.SIZE - 1));
          // equivalent to Math.min(delta, 0)
    
          a = delta - minDeltaOrZero - minDeltaOrZero; // sets a to Math.abs(a - b)
          // a is now nonnegative and even
    
          b += minDeltaOrZero; // sets b to min(old a, b)
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/IntMath.java

          int delta = a - b; // can't overflow, since a and b are nonnegative
    
          int minDeltaOrZero = delta & (delta >> (Integer.SIZE - 1));
          // equivalent to Math.min(delta, 0)
    
          a = delta - minDeltaOrZero - minDeltaOrZero; // sets a to Math.abs(a - b)
          // a is now nonnegative and even
    
          b += minDeltaOrZero; // sets b to min(old a, b)
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/math/ToDoubleRounder.java

      abstract int sign(X x);
    
      /** Returns d's value as an X, rounded with the specified mode. */
      abstract X toX(double d, RoundingMode mode);
    
      /** Returns a - b, guaranteed that both arguments are nonnegative. */
      abstract X minus(X a, X b);
    
      /** Rounds {@code x} to a {@code double}. */
      final double roundToDouble(X x, RoundingMode mode) {
        checkNotNull(x, "x");
        checkNotNull(mode, "mode");
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/math/ToDoubleRounder.java

      abstract int sign(X x);
    
      /** Returns d's value as an X, rounded with the specified mode. */
      abstract X toX(double d, RoundingMode mode);
    
      /** Returns a - b, guaranteed that both arguments are nonnegative. */
      abstract X minus(X a, X b);
    
      /** Rounds {@code x} to a {@code double}. */
      final double roundToDouble(X x, RoundingMode mode) {
        checkNotNull(x, "x");
        checkNotNull(mode, "mode");
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. src/cmd/go/internal/vcweb/vcstest/vcstest_test.go

    	dir  = flag.String("dir", "../../../testdata/vcstest", "directory containing scripts to serve")
    	host = flag.String("host", "localhost", "hostname on which to serve HTTP")
    	port = flag.Int("port", -1, "port on which to serve HTTP; if nonnegative, skips running tests")
    )
    
    func TestMain(m *testing.M) {
    	flag.Parse()
    
    	if *port >= 0 {
    		err := serveStandalone(*host, *port)
    		if err != nil {
    			log.Fatal(err)
    		}
    		os.Exit(0)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 11 16:04:21 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/loopbce.go

    				// negative offset from a known non-negative value.
    				knn, k := findKNN(limit)
    				if knn == nil || k < 0 {
    					return false
    				}
    				// limit == (something nonnegative) - k. That subtraction can't underflow, so
    				// we can trust it.
    				if inclusive {
    					// ind <= knn - k cannot overflow if step is at most k
    					return step <= k
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 17:37:47 UTC 2023
    - 11.8K bytes
    - Viewed (0)
Back to top