Package org.oristool.math.expression
Class MathUtil
java.lang.Object
org.oristool.math.expression.MathUtil
Mathematical calculations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BigInteger
Computes the binomial coefficient "n choose k".static BigInteger
calculateFactorial
(int n) Computes the factorial n!.
-
Constructor Details
-
MathUtil
public MathUtil()
-
-
Method Details
-
calculateBinomialCoefficient
Computes the binomial coefficient "n choose k".- Parameters:
n
- set sizek
- elements to choose- Returns:
- number of ways to choose k elements, disregarding their order
-
calculateFactorial
Computes the factorial n!.- Parameters:
n
- set size- Returns:
- distinct ordered permutations of n objects
-