org.apache.commons.math3.special.Gamma.lanczos()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中org.apache.commons.math3.special.Gamma.lanczos()方法的一些代码示例,展示了Gamma.lanczos()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Gamma.lanczos()方法的具体详情如下:
包路径:org.apache.commons.math3.special.Gamma
类名称:Gamma
方法名:lanczos

Gamma.lanczos介绍

[英]Returns the Lanczos approximation used to compute the gamma function. The Lanczos approximation is related to the Gamma function by the following equation gamma(x) = sqrt(2 * pi) / x * (x + g + 0.5) ^ (x + 0.5), where g is the Lanczos constant.
[中]返回用于计算gamma函数的Lanczos近似值。Lanczos近似与Gamma函数相关,通过以下方程式Gamma(x)=sqrt(2pi)/x(x+g+0.5)^(x+0.5),其中g为Lanczos常数。

代码示例

代码示例来源:origin: org.apache.commons/commons-math3

double sum = lanczos(x);
double tmp = x + LANCZOS_G + .5;
ret = ((x + .5) * FastMath.log(tmp)) - tmp +

代码示例来源:origin: org.apache.commons/commons-math3

this.shiftedShape = shape + Gamma.LANCZOS_G + 0.5;
final double aux = FastMath.E / (2.0 * FastMath.PI * shiftedShape);
this.densityPrefactor2 = shape * FastMath.sqrt(aux) / Gamma.lanczos(shape);
this.logDensityPrefactor2 = FastMath.log(shape) + 0.5 * FastMath.log(aux) -
              FastMath.log(Gamma.lanczos(shape));
this.densityPrefactor1 = this.densityPrefactor2 / scale *
    FastMath.pow(shiftedShape, -shape) *

代码示例来源:origin: org.apache.commons/commons-math3

final double gammaAbs = SQRT_TWO_PI / absX *
            FastMath.pow(y, absX + 0.5) *
            FastMath.exp(-y) * lanczos(absX);
if (x > 0.0) {
  ret = gammaAbs;

代码示例来源:origin: geogebra/geogebra

this.shiftedShape = shape + Gamma.LANCZOS_G + 0.5;
final double aux = Math.E / (2.0 * Math.PI * shiftedShape);
this.densityPrefactor2 = shape * Math.sqrt(aux) / Gamma.lanczos(shape);
this.logDensityPrefactor2 = Math.log(shape) + 0.5 * Math.log(aux) -
              Math.log(Gamma.lanczos(shape));
this.densityPrefactor1 = this.densityPrefactor2 / scale *
    Math.pow(shiftedShape, -shape) *

代码示例来源:origin: geogebra/geogebra

double sum = lanczos(x);
double tmp = x + LANCZOS_G + .5;
ret = ((x + .5) * Math.log(tmp)) - tmp +

代码示例来源:origin: geogebra/geogebra

final double gammaAbs = SQRT_TWO_PI / absX *
            Math.pow(y, absX + 0.5) *
            Math.exp(-y) * lanczos(absX);
if (x > 0.0) {
  ret = gammaAbs;

代码示例来源:origin: io.virtdata/virtdata-lib-realer

double sum = lanczos(x);
double tmp = x + LANCZOS_G + .5;
ret = ((x + .5) * FastMath.log(tmp)) - tmp +

代码示例来源:origin: io.virtdata/virtdata-lib-realer

this.shiftedShape = shape + Gamma.LANCZOS_G + 0.5;
final double aux = FastMath.E / (2.0 * FastMath.PI * shiftedShape);
this.densityPrefactor2 = shape * FastMath.sqrt(aux) / Gamma.lanczos(shape);
this.logDensityPrefactor2 = FastMath.log(shape) + 0.5 * FastMath.log(aux) -
              FastMath.log(Gamma.lanczos(shape));
this.densityPrefactor1 = this.densityPrefactor2 / scale *
    FastMath.pow(shiftedShape, -shape) *

代码示例来源:origin: io.virtdata/virtdata-lib-realer

final double gammaAbs = SQRT_TWO_PI / absX *
            FastMath.pow(y, absX + 0.5) *
            FastMath.exp(-y) * lanczos(absX);
if (x > 0.0) {
  ret = gammaAbs;

相关文章