Package org.apache.commons.numbers.gamma
Class RegularizedBeta
- java.lang.Object
-
- org.apache.commons.numbers.gamma.RegularizedBeta
-
public class RegularizedBeta extends java.lang.ObjectRegularized Beta function.This class is immutable.
-
-
Constructor Summary
Constructors Constructor Description RegularizedBeta()
-
Method Summary
Modifier and Type Method Description static doublevalue(double x, double a, double b)Computes the value of the regularized beta function I(x, a, b).static doublevalue(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:
java.lang.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:
java.lang.ArithmeticException- if the algorithm fails to converge.
-
-