public class MathX extends Object
Constructor and Description |
---|
MathX() |
Modifier and Type | Method and Description |
---|---|
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.
|
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
- Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.