本文整理汇总了Java中org.apache.commons.math3.special.Gamma.gamma方法的典型用法代码示例。如果您正苦于以下问题:Java Gamma.gamma方法的具体用法?Java Gamma.gamma怎么用?Java Gamma.gamma使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.special.Gamma
的用法示例。
在下文中一共展示了Gamma.gamma方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeBetaIsTrue
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
private double computeBetaIsTrue(int t, int v) {
int betaSumOfAllOthers = betaTWSum[t]
- convertValueFromBooleanToInt(betaTW[t][v]);
double p = 1;
return p
* Gamma.gamma(gamma + cTW[t][v] + gammaS)
* Gamma.gamma(betaSumOfAllOthers * gamma + gamma + param.V
* gammaS)
* Gamma.gamma(betaSumOfAllOthers * gamma + cT[t] + param.V
* gammaS) * (sv + betaSumOfAllOthers);
}
示例2: computeBetaIsFalse
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
private double computeBetaIsFalse(int t, int v) {
int betaSumOfAllOthers = betaTWSum[t]
- convertValueFromBooleanToInt(betaTW[t][v]);
double p = 1;
return p
* Gamma.gamma(gamma + gammaS)
* Gamma.gamma(betaSumOfAllOthers * gamma + param.V * gammaS)
* Gamma.gamma(betaSumOfAllOthers * gamma + cT[t] + param.V
* gammaS + gamma)
* (svn + param.V - 1 - betaSumOfAllOthers);
}
示例3: density
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
/** {@inheritDoc} */
public double density(double x) {
if (x <= 0) {
return 0.0;
}
return 2.0 * FastMath.pow(mu, mu) / (Gamma.gamma(mu) * FastMath.pow(omega, mu)) *
FastMath.pow(x, 2 * mu - 1) * FastMath.exp(-mu * x * x / omega);
}
示例4: value
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
@Override
public double value(double a) {
// Cannot evaluate a gamma at zero, so set a to a minimum value..
final double aPrime = Math.max(a, MIN_L);
final double pAlpha = gammaDistribution.density(aPrime);
final double gammaAlpha = Gamma.gamma(aPrime);
final double numerator = pAlpha * gammaAlpha;
final double denominator = Math.pow(Gamma.gamma(aPrime/numEffectivePhis), numEffectivePhis);
final double coeff = numerator/denominator;
return coeff * Math.exp((aPrime/numEffectivePhis) * sumLogEffectivePhis);
}
示例5: factorial
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
/**
* Return the factorial for the given real number, using the gamma function
*
* @param k
* @return the factorial
*/
public static double factorial(double k)
{
if (k <= 1)
return 1;
return Gamma.gamma(k + 1);
}
示例6: getNumericalMean
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
/** {@inheritDoc} */
public double getNumericalMean() {
return Gamma.gamma(mu + 0.5) / Gamma.gamma(mu) * FastMath.sqrt(omega / mu);
}
示例7: getNumericalVariance
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
/** {@inheritDoc} */
public double getNumericalVariance() {
double v = Gamma.gamma(mu + 0.5) / Gamma.gamma(mu);
return omega * (1 - 1 / mu * v * v);
}
示例8: gammaFunction
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
public static double gammaFunction(final double arg) {
return Gamma.gamma(arg);
}
示例9: factorial
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
private static double factorial(double k)
{
if (k <= 1)
return 1;
return Gamma.gamma(k + 1);
}
示例10: op
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
@Override
public double op(double d) {
return Gamma.gamma(d);
}
示例11: op
import org.apache.commons.math3.special.Gamma; //导入方法依赖的package包/类
double op(double d) { return Gamma.gamma(d);}