de.unihalle.informatik.MiToBo.math
Class MathX

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.math.MathX

public class MathX
extends java.lang.Object

Math class with functions that are not provided by Java's Math class.

Author:
Oliver Gress

Constructor Summary
MathX()
           
 
Method Summary
static double binomial(int n, int k)
          Binomial coefficient of n over k
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

MathX

public MathX()
Method Detail

binomial

public static double binomial(int n,
                              int k)
Binomial coefficient of n over k

Parameters:
n -
k -
Returns:

logSumP

public 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.

Parameters:
logP1 - natural logarithm of P1: log(P1)
logP2 - natural logarithm of P2: log(P2)
Returns:
log( P1 + P2 )