# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.function.special.gamma

## Class GammaRegularizedQ

• All Implemented Interfaces:
Function<Vector,Double>, BivariateRealFunction, RealScalarFunction

public class GammaRegularizedQ
extends AbstractBivariateRealFunction
The Regularized Incomplete Gamma Q function is defined as: $Q(s,x)=\frac{\Gamma(s,x)}{\Gamma(s)}=1-P(s,x), s \geq 0, x \geq 0$ The algorithm used for computing the regularized incomplete Gamma Q function depends on the values of s and x.
• For $$s > 100$$, Q is approximated using the Gauss-Legendre quadrature.
• For $$x < s + 1$$, Q is approximated using the Pearson's series representation.
• Otherwise, Q is approximated using the continued fraction expression by Legendre.
The R equivalent function is pgamma. E.g., pgamma(x, s, lower=FALSE).

• ### Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function

Function.EvaluationException
• ### Constructor Summary

Constructors
Constructor and Description
GammaRegularizedQ()
• ### Method Summary

All Methods
Modifier and Type Method and Description
double evaluate(double s, double x)
Evaluate Q(s,x).
• ### Methods inherited from class com.numericalmethod.suanshu.analysis.function.rn2r1.AbstractBivariateRealFunction

evaluate
• ### Methods inherited from class com.numericalmethod.suanshu.analysis.function.rn2r1.AbstractRealScalarFunction

dimensionOfDomain, dimensionOfRange
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Methods inherited from interface com.numericalmethod.suanshu.analysis.function.Function

dimensionOfDomain, dimensionOfRange
• ### Constructor Detail

• #### GammaRegularizedQ

public GammaRegularizedQ()
• ### Method Detail

• #### evaluate

public double evaluate(double s,
double x)
Evaluate Q(s,x).
Parameters:
s - s ≥ 0
x - x ≥ 0
Returns:
Q(s,x)