Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for binomials (0.21 sec)

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

              longsToMul[i][j] = randomBigInteger(Long.SIZE - 2).longValue();
            }
          } while (!Impl.GUAVA.noMulOverflow(longsToMul[i][0], longsToMul[i][1]));
    
          int k = binomials[i][1] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials.length);
          binomials[i][0] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials[k] - k) + k;
        }
      }
    
      @Benchmark
      long factorialDouble(int reps) {
        long tmp = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.9K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

          tmp += BigIntegerMath.factorial(factorials[j]).intValue();
        }
        return tmp;
      }
    
      @Benchmark
      int binomial(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & 0xffff;
          tmp += BigIntegerMath.binomial(factorials[j], binomials[j]).intValue();
        }
        return tmp;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.3K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java

              longsToMul[i][j] = randomBigInteger(Long.SIZE - 2).longValue();
            }
          } while (!Impl.GUAVA.noMulOverflow(longsToMul[i][0], longsToMul[i][1]));
    
          int k = binomials[i][1] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials.length);
          binomials[i][0] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials[k] - k) + k;
        }
      }
    
      @Benchmark
      long factorialDouble(int reps) {
        long tmp = 0;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.9K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

          tmp += BigIntegerMath.factorial(factorials[j]).intValue();
        }
        return tmp;
      }
    
      @Benchmark
      int binomial(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & 0xffff;
          tmp += BigIntegerMath.binomial(factorials[j], binomials[j]).intValue();
        }
        return tmp;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/LongMathTest.java

      }
    
      // Depends on the correctness of BigIntegerMath.binomial.
      public void testBinomial() {
        for (int n = 0; n <= 70; n++) {
          for (int k = 0; k <= n; k++) {
            BigInteger expectedBig = BigIntegerMath.binomial(n, k);
            long expectedLong = fitsInLong(expectedBig) ? expectedBig.longValue() : Long.MAX_VALUE;
            assertEquals(expectedLong, LongMath.binomial(n, k));
          }
        }
      }
    
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/LongMathTest.java

      }
    
      // Depends on the correctness of BigIntegerMath.binomial.
      public void testBinomial() {
        for (int n = 0; n <= 70; n++) {
          for (int k = 0; k <= n; k++) {
            BigInteger expectedBig = BigIntegerMath.binomial(n, k);
            long expectedLong = fitsInLong(expectedBig) ? expectedBig.longValue() : Long.MAX_VALUE;
            assertEquals(expectedLong, LongMath.binomial(n, k));
          }
        }
      }
    
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += IntMath.factorial(factorial[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int binomial(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.binomial(factorial[j], binomial[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int isPrime(int reps) {
        int tmp = 0;
    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)
  8. guava-tests/test/com/google/common/math/IntMathTest.java

      }
    
      // Depends on the correctness of BigIntegerMath.binomial.
      public void testBinomial() {
        for (int n = 0; n <= 50; n++) {
          for (int k = 0; k <= n; k++) {
            BigInteger expectedBig = BigIntegerMath.binomial(n, k);
            int expectedInt = fitsInInt(expectedBig) ? expectedBig.intValue() : Integer.MAX_VALUE;
            assertEquals(expectedInt, IntMath.binomial(n, k));
          }
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += LongMath.factorial(factorialArguments[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int binomial(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += LongMath.binomial(binomialArguments[j][0], binomialArguments[j][1]);
        }
        return tmp;
      }
    
      @Benchmark
      int isPrime(int reps) {
        int tmp = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/math/IntMathTest.java

      }
    
      // Depends on the correctness of BigIntegerMath.binomial.
      public void testBinomial() {
        for (int n = 0; n <= 50; n++) {
          for (int k = 0; k <= n; k++) {
            BigInteger expectedBig = BigIntegerMath.binomial(n, k);
            int expectedInt = fitsInInt(expectedBig) ? expectedBig.intValue() : Integer.MAX_VALUE;
            assertEquals(expectedInt, IntMath.binomial(n, k));
          }
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
Back to top