Class RegularizedBeta

java.lang.Object
org.apache.commons.numbers.gamma.RegularizedBeta

public class RegularizedBeta
extends java.lang.Object
Regularized Beta function.

This class is immutable.

  • Constructor Summary

    Constructors 
    Constructor Description
    RegularizedBeta()  
  • Method Summary

    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).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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 - Parameter a.
      b - Parameter b.
      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 - 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.
      Returns:
      the regularized beta function I(x, a, b).
      Throws:
      java.lang.ArithmeticException - if the algorithm fails to converge.