Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 10 for Binomial (0.08 seconds)

  1. android/guava/src/com/google/common/math/IntMath.java

      };
    
      /**
       * Returns {@code n} choose {@code k}, also known as the binomial coefficient of {@code n} and
       * {@code k}, or {@link Integer#MAX_VALUE} if the result does not fit in an {@code int}.
       *
       * @throws IllegalArgumentException if {@code n < 0}, {@code k < 0} or {@code k > n}
       */
      public static int binomial(int n, int k) {
        checkNonNegative("n", n);
        checkNonNegative("k", k);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 26.1K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/collect/Collections2Test.java

                .size());
    
        // Almost force an overflow in the binomial coefficient calculation
        assertEquals(
            1391975640 /*C(34,14)*/,
            Collections2.orderedPermutations(concat(nCopies(20, 1), nCopies(14, 2))).size());
        // Do force an overflow in the binomial coefficient calculation
        assertEquals(
            Integer.MAX_VALUE,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 20.1K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/math/LongMath.java

      };
    
      /**
       * Returns {@code n} choose {@code k}, also known as the binomial coefficient of {@code n} and
       * {@code k}, or {@link Long#MAX_VALUE} if the result does not fit in a {@code long}.
       *
       * @throws IllegalArgumentException if {@code n < 0}, {@code k < 0}, or {@code k > n}
       */
      public static long binomial(int n, int k) {
        checkNonNegative("n", n);
        checkNonNegative("k", k);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 09 23:01:02 GMT 2026
    - 46.8K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/collect/Collections2Test.java

                .size());
    
        // Almost force an overflow in the binomial coefficient calculation
        assertEquals(
            1391975640 /*C(34,14)*/,
            Collections2.orderedPermutations(concat(nCopies(20, 1), nCopies(14, 2))).size());
        // Do force an overflow in the binomial coefficient calculation
        assertEquals(
            Integer.MAX_VALUE,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 20.1K bytes
    - Click Count (0)
  5. 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));
          }
        }
      }
    
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Oct 30 14:15:36 GMT 2025
    - 31.4K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            assertEquals(expected, BigIntegerMath.binomial(n, k));
          }
        }
      }
    
      public void testBinomialOutside() {
        for (int i = 0; i <= 50; i++) {
          int n = i;
          assertThrows(IllegalArgumentException.class, () -> BigIntegerMath.binomial(n, -1));
          assertThrows(IllegalArgumentException.class, () -> BigIntegerMath.binomial(n, n + 1));
        }
      }
    
      @J2ktIncompatible
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 04:51:56 GMT 2026
    - 27.1K bytes
    - Click Count (0)
  7. guava/src/com/google/common/collect/Collections2.java

              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
        public int size() {
          return size;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 16:16:42 GMT 2026
    - 23K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/collect/Sets.java

                    return size;
                  }
                };
              }
            };
          }
    
          @Override
          public int size() {
            return IntMath.binomial(index.size(), size);
          }
    
          @Override
          public String toString() {
            return "Sets.combinations(" + index.keySet() + ", " + size + ")";
          }
        };
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 81.4K bytes
    - Click Count (0)
  9. guava/src/com/google/common/collect/Sets.java

                    return size;
                  }
                };
              }
            };
          }
    
          @Override
          public int size() {
            return IntMath.binomial(index.size(), size);
          }
    
          @Override
          public String toString() {
            return "Sets.combinations(" + index.keySet() + ", " + size + ")";
          }
        };
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 83K bytes
    - Click Count (0)
  10. RELEASE.md

        *   Add a new "result_type" parameter to `tf.strings.split`.
        *   Add name argument to `tf.string_split` and `tf.strings_split`.
        *   Extend `tf.strings.split` to support inputs with any rank.
        *   Added `tf.random.binomial`.
        *   Added `key` and `skip` methods to `random.experimental.Generator`.
        *   Extend `tf.function` with basic support for CompositeTensors arguments
            (such as `SparseTensor` and `RaggedTensor`).
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Mon Mar 30 18:31:38 GMT 2026
    - 746.5K bytes
    - Click Count (3)
Back to Top