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