- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 35 for factorial (0.11 sec)
-
guava-tests/test/com/google/common/math/IntMathTest.java
} } // Depends on the correctness of BigIntegerMath.factorial. public void testFactorial() { for (int n = 0; n <= 50; n++) { BigInteger expectedBig = BigIntegerMath.factorial(n); int expectedInt = fitsInInt(expectedBig) ? expectedBig.intValue() : Integer.MAX_VALUE; assertEquals(expectedInt, IntMath.factorial(n)); } } public void testFactorialNegative() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java
* * @author Louis Wasserman */ public class ApacheBenchmark { private enum Impl { GUAVA { @Override public double factorialDouble(int n) { return DoubleMath.factorial(n); } @Override public int gcdInt(int a, int b) { return IntMath.gcd(a, b); } @Override public long gcdLong(long a, long b) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 6.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
long expected = 1; for (int i = 0; i < LongMath.factorials.length; i++, expected *= i) { assertEquals(expected, LongMath.factorials[i]); } assertThrows( ArithmeticException.class, () -> LongMath.checkedMultiply( LongMath.factorials[LongMath.factorials.length - 1], LongMath.factorials.length)); } @GwtIncompatible // TODO
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/src/com/google/common/collect/Collections2.java
final ImmutableList<E> inputList; PermutationCollection(ImmutableList<E> input) { this.inputList = input; } @Override public int size() { return IntMath.factorial(inputList.size()); } @Override public boolean isEmpty() { return false; } @Override public Iterator<List<E>> iterator() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 22.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/Collections2.java
final ImmutableList<E> inputList; PermutationCollection(ImmutableList<E> input) { this.inputList = input; } @Override public int size() { return IntMath.factorial(inputList.size()); } @Override public boolean isEmpty() { return false; } @Override public Iterator<List<E>> iterator() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 23.1K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* * @throws IllegalArgumentException if {@code n < 0} */ @GwtIncompatible // TODO public static long factorial(int n) { checkNonNegative("n", n); return (n < factorials.length) ? factorials[n] : Long.MAX_VALUE; } static final long[] factorials = { 1L, 1L, 1L * 2, 1L * 2 * 3, 1L * 2 * 3 * 4, 1L * 2 * 3 * 4 * 5, 1L * 2 * 3 * 4 * 5 * 6,
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/src/com/google/common/math/LongMath.java
* * @throws IllegalArgumentException if {@code n < 0} */ @GwtIncompatible // TODO public static long factorial(int n) { checkNonNegative("n", n); return (n < factorials.length) ? factorials[n] : Long.MAX_VALUE; } static final long[] factorials = { 1L, 1L, 1L * 2, 1L * 2 * 3, 1L * 2 * 3 * 4, 1L * 2 * 3 * 4 * 5, 1L * 2 * 3 * 4 * 5 * 6,
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-testlib/src/com/google/common/testing/ClassSanityTester.java
if (cls.isEnum()) { return; } List<? extends Invokable<?, ?>> factories = Lists.reverse(getFactories(TypeToken.of(cls))); if (factories.isEmpty()) { return; } int numberOfParameters = factories.get(0).getParameters().size(); List<ParameterNotInstantiableException> paramErrors = Lists.newArrayList();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:18:12 UTC 2024 - 32.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java
import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.lang.Thread.UncaughtExceptionHandler; import java.util.Locale; /** * Factories for {@link UncaughtExceptionHandler} instances. * * @author Gregory Kick * @since 8.0 */ @J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class UncaughtExceptionHandlers {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Dec 14 20:35:03 UTC 2023 - 2.8K bytes - Viewed (0) -
guava/src/com/google/common/io/package-info.java
* and files. * * <p>At the core of this package are the Source/Sink types: {@link ByteSource ByteSource}, {@link * CharSource CharSource}, {@link ByteSink ByteSink} and {@link CharSink CharSink}. They are * factories for I/O streams that provide many convenience methods that handle both opening and * closing streams for you. * * <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 23 19:57:03 UTC 2023 - 1.5K bytes - Viewed (0)