- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Binomial (0.19 sec)
-
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 19 16:21:24 UTC 2024 - 3.4K bytes - Viewed (0) -
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) -
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) -
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) -
guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 19 16:21:24 UTC 2024 - 3.4K bytes - Viewed (0) -
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) -
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,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 21 10:16:44 UTC 2024 - 19.7K bytes - Viewed (0) -
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) -
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,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 21 10:16:44 UTC 2024 - 19.7K bytes - Viewed (0) -
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)