|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.statistics.GammaFunction
public abstract class GammaFunction
Base class for implementations of the Gamma function. Use getGammaFunction() to obtain an instance. The exact instance can be controlled by property gamma.function For consistency when computing logarithms of the gamma function, all implementations assume positive input values. In practice, as the gamma function can generate large values, normal usage should use compute_log() anyway.
Properties:
<ul>
Constructor Summary | |
---|---|
GammaFunction()
|
Method Summary | |
---|---|
abstract double |
compute_log(double number)
Get the value of the log of gamma function for the specified number. |
abstract double |
compute(double number)
Get the value of the gamma function for the specified number. |
static long |
factorial(long n)
Compute factorial of n, for 0 < n < 21. |
static GammaFunction |
getGammaFunction()
Obtain an instance of GammaFunction |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GammaFunction()
Method Detail |
---|
public abstract double compute(double number)
number
- for which is required
public abstract double compute_log(double number)
number
- for which is required
public static final GammaFunction getGammaFunction()
public static final long factorial(long n)
n
- number to compute for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |