class IncompleteBetaFunction extends Function1D<Double, Double> {

  @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);
    }
  }

  public  IncompleteBetaFunction(final double a, final double b);
  public  IncompleteBetaFunction(final double a, final double b, final double eps, final int maxIter);

}