Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for binomial (0.13 sec)

  1. 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));
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. 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));
          }
        }
      }
    
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  3. 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));
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/BigIntegerMath.java

      /**
       * Returns {@code n} choose {@code k}, also known as the binomial coefficient of {@code n} and
       * {@code k}, that is, {@code n! / (k! (n - k)!)}.
       *
       * <p><b>Warning:</b> the result can take as much as <i>O(k log n)</i> space.
       *
       * @throws IllegalArgumentException if {@code n < 0}, {@code k < 0}, or {@code k > n}
       */
      public static BigInteger binomial(int n, int k) {
        checkNonNegative("n", n);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  5. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  6. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. android/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;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  8. 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;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. 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 + ")";
          }
        };
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 78.8K bytes
    - Viewed (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`).
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Tue Oct 22 14:33:53 UTC 2024
    - 735.3K bytes
    - Viewed (0)
Back to top