List of usage examples for org.apache.commons.math3.special Beta regularizedBeta
public static double regularizedBeta(double x, final double a, final double b, double epsilon, int maxIterations)
From source file:com.opengamma.strata.math.impl.function.special.IncompleteBetaFunction.java
/** * Evaluates the function.//from ww w . j ava2s . co m * * @param x x * @return the value of the function * @throws IllegalArgumentException if $x < 0$ or $x > 1$ */ @Override public Double apply(Double x) { ArgChecker.isTrue(x >= 0 && x <= 1, "x must be in the range 0 to 1"); try { return Beta.regularizedBeta(x, _a, _b, _eps, _maxIter); } catch (MaxCountExceededException e) { throw new MathException(e); } }