Package org.apache.commons.numbers.gamma
Class RegularizedBeta
- java.lang.Object
-
- org.apache.commons.numbers.gamma.RegularizedBeta
-
public final class RegularizedBeta extends Object
Regularized Beta function.This class is immutable.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
value(double x, double a, double b)
Computes the value of the regularized beta function I(x, a, b).static double
value(double x, double a, double b, double epsilon, int maxIterations)
Computes the value of the regularized beta function I(x, a, b).
-
-
-
Method Detail
-
value
public static double value(double x, double a, double b)
Computes the value of the regularized beta function I(x, a, b).- Parameters:
x
- Value.a
- Parametera
.b
- Parameterb
.- Returns:
- the regularized beta function I(x, a, b).
- Throws:
ArithmeticException
- if the algorithm fails to converge.
-
value
public static double value(double x, double a, double b, double epsilon, int maxIterations)
Computes the value of the regularized beta function I(x, a, b). The implementation of this method is based on:- Parameters:
x
- the value.a
- Parametera
.b
- Parameterb
.epsilon
- When the absolute value of the nth item in the series is less than epsilon the approximation ceases to calculate further elements in the series.maxIterations
- Maximum number of "iterations" to complete.- Returns:
- the regularized beta function I(x, a, b).
- Throws:
ArithmeticException
- if the algorithm fails to converge.
-
-