|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.math.MathX
public class MathX
Math class with functions that are not provided by Java's Math class.
Constructor Summary | |
---|---|
MathX()
|
Method Summary | |
---|---|
static double |
binomial(int n,
int k)
Binomial coefficient of n over k |
static int |
factorial(int n)
Calculates the factorial of the given natural number. |
static double |
logSumP(double logP1,
double logP2)
Natural logarithm of the sum of two values P1 and P2 when only their natural logarithms log(P1) and log(P2) are given. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MathX()
Method Detail |
---|
public static double logSumP(double logP1, double logP2)
logP1
- natural logarithm of P1: log(P1)logP2
- natural logarithm of P2: log(P2)
public static int factorial(int n)
n
- Number to calculate the factorial for, must be positive.
public static double binomial(int n, int k)
n
- k
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |