public final class BigIntegerUtils extends Object
BigInteger.| Modifier and Type | Method and Description |
|---|---|
static BigInteger |
combination(int n,
int k)
Compute the combination function or the binomial coefficient.
|
static BigInteger |
factorial(int n)
Compute the n factorial.
|
static BigInteger |
permutation(int n,
int k)
Compute the permutation function.
|
public static BigInteger factorial(int n)
n - an integern!public static BigInteger combination(int n, int k)
n - the size of the full setk - the size of a combinationn! / (n-k)! / k!public static BigInteger permutation(int n, int k)
n - the size of the full setk - the size of a permutationn! / (n-k)!Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.