public class Beta
extends java.lang.Object
This is a utility class that provides computation methods related to the Beta family of functions.
Implementation of logBeta(double, double)
is based on the
algorithms described in
Modifier and Type | Method and Description |
---|---|
static double |
logBeta(double p,
double q)
Returns the value of log B(p, q) for 0 ?
|
static double |
regularizedBeta(double x,
double a,
double b)
Returns the
regularized beta function I(x, a, b).
|
static double |
regularizedBeta(double x,
double a,
double b,
double epsilon)
Returns the
regularized beta function I(x, a, b).
|
static double |
regularizedBeta(double x,
double a,
double b,
double epsilon,
int maxIterations)
Returns the regularized beta function I(x, a, b).
|
static double |
regularizedBeta(double x,
double a,
double b,
int maxIterations)
Returns the regularized beta function I(x, a, b).
|
public static double regularizedBeta(double x, double a, double b) throws java.lang.Exception
x
- Value.a
- Parameter a
.b
- Parameter b
.org.apache.commons.math3.exception.MaxCountExceededException
- if the algorithm fails to converge.java.lang.Exception
public static double regularizedBeta(double x, double a, double b, double epsilon) throws java.lang.Exception
x
- Value.a
- Parameter a
.b
- Parameter b
.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.org.apache.commons.math3.exception.MaxCountExceededException
- if the algorithm fails to converge.java.lang.Exception
public static double regularizedBeta(double x, double a, double b, int maxIterations) throws java.lang.Exception
x
- the value.a
- Parameter a
.b
- Parameter b
.maxIterations
- Maximum number of "iterations" to complete.org.apache.commons.math3.exception.MaxCountExceededException
- if the algorithm fails to converge.java.lang.Exception
public static double regularizedBeta(double x, double a, double b, double epsilon, int maxIterations) throws java.lang.Exception
x
- the value.a
- Parameter a
.b
- Parameter b
.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.org.apache.commons.math3.exception.MaxCountExceededException
- if the algorithm fails to converge.java.lang.Exception
public static double logBeta(double p, double q) throws java.lang.Exception
DBETLN
.p
- First argument.q
- Second argument.log(Beta(p, q))
, NaN
if
p <= 0
or q <= 0
.java.lang.Exception