All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.core.SpecialFunctions

java.lang.Object
   |
   +----weka.core.SpecialFunctions

public final class SpecialFunctions
extends Object
Class implementing some mathematical functions.

Version:
$Revision: 1.2 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)

Constructor Index

 o SpecialFunctions()

Method Index

 o lnFactorial(double)
Returns natural logarithm of factorial using gamma function.
 o lnGamma(double)
Returns natural logarithm of gamma function.
 o log2Binomial(double, double)
Returns base 2 logarithm of binomial coefficient using gamma function.
 o log2Multinomial(double, double[])
Returns base 2 logarithm of multinomial using gamma function.
 o main(String[])
Main method for testing this class.

Constructors

 o SpecialFunctions
 public SpecialFunctions()

Methods

 o lnFactorial
 public static double lnFactorial(double x)
Returns natural logarithm of factorial using gamma function.

Parameters:
x - the value
Returns:
natural logarithm of factorial
 o lnGamma
 public static double lnGamma(double x)
Returns natural logarithm of gamma function. Converted to java from Numerical Recipes in C.

Parameters:
x - the value
Returns:
natural logarithm of gamma function
 o log2Binomial
 public static double log2Binomial(double a,
                                   double b) throws ArithmeticException
Returns base 2 logarithm of binomial coefficient using gamma function.

Parameters:
a - upper part of binomial coefficient
b - lower part
Returns:
the base 2 logarithm of the binominal coefficient a over b
 o log2Multinomial
 public static double log2Multinomial(double a,
                                      double bs[]) throws ArithmeticException
Returns base 2 logarithm of multinomial using gamma function.

Parameters:
a - upper part of multinomial coefficient
bs - lower part
Returns:
multinomial coefficient of a over the bs
 o main
 public static void main(String ops[])
Main method for testing this class.


All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home