|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.number.big.BigIntegerUtils
public class BigIntegerUtils
This class collects a set of utility functions for the java class BigInteger.
| Method Summary | |
|---|---|
static java.math.BigInteger |
combination(int n,
int k)
Compute the combination function/binomial coefficient. |
static java.math.BigInteger |
factorial(int n)
Compute the n factorial. |
static java.math.BigInteger |
permutation(int n,
int k)
Compute the permutation function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.math.BigInteger factorial(int n)
n factorial.
n - an integer
n!
public static java.math.BigInteger combination(int n,
int k)
k-combinations (each of size k) from a set S with n elements (size n).
n - the size of the full setk - the size of a combination
n! / (n-k)! / k!
public static java.math.BigInteger permutation(int n,
int k)
k-permutations (each of size k) from a set S with n elements (size n).
n - the size of the full setk - the size of a permutation
n! / (n-k)!
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||