|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction
com.numericalmethod.suanshu.analysis.function.special.LogGamma
public class LogGamma
This computes an approximation to the log Gamma function, log(Γ(z)), for positive real numbers.
We provide a few ways to compute log(Γ(z)).
Each method differs in accuracy and speed.
For example,
The full Lanczos approximation can be made arbitrarily precise because it is computed using BigDecimal.
The quick Lanczos approximation is quick but could be less precise because the computations are done in double precision.
| Nested Class Summary | |
|---|---|
static class |
LogGamma.Method
the methods available to compute log(Γ(z)) |
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function |
|---|
Function.EvaluationException |
| Constructor Summary | |
|---|---|
LogGamma()
Construct an instance to compute for log Gamma function with default settings. |
|
LogGamma(LogGamma.Method method,
double g,
int n,
int scale)
Construct an instance to compute for log Gamma function. |
|
| Method Summary | |
|---|---|
double |
evaluate(double x)
Compute for the Gamma function in the positive Real domain. |
| Methods inherited from class com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction |
|---|
dimension4Domain, dimension4Range, evaluate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogGamma()
public LogGamma(LogGamma.Method method,
double g,
int n,
int scale)
Recommended settings are
g = 607.0 / 128.0
n = 15
scale = 30
method - the algorithm to use, which affects only precisiong - gn - nscale - precision| Method Detail |
|---|
public double evaluate(double x)
evaluate in class UnivariateRealFunctionx - a real number > 0
log(Γ(z))
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||