/** * Find a zero near the midpoint of {@code min} and {@code max}. * * @param f Function to solve. * @param min Lower bound for the interval. * @param max Upper bound for the interval. * @param maxEval Maximum number of evaluations. * @return the value where the function is zero. * @throws org.apache.commons.math3.exception.TooManyEvaluationsException * if the maximum evaluation count is exceeded. * @throws org.apache.commons.math3.exception.NumberIsTooLargeException * if {@code min >= max}. */ @Override public double solve(int maxEval, final DifferentiableUnivariateFunction f, final double min, final double max) throws TooManyEvaluationsException { return super.solve(maxEval, f, UnivariateSolverUtils.midpoint(min, max)); }
/** * Find a zero near the midpoint of {@code min} and {@code max}. * * @param f Function to solve. * @param min Lower bound for the interval. * @param max Upper bound for the interval. * @param maxEval Maximum number of evaluations. * @return the value where the function is zero. * @throws org.apache.commons.math3.exception.TooManyEvaluationsException * if the maximum evaluation count is exceeded. * @throws org.apache.commons.math3.exception.NumberIsTooLargeException * if {@code min >= max}. */ @Override public double solve(int maxEval, final DifferentiableUnivariateFunction f, final double min, final double max) throws TooManyEvaluationsException { return super.solve(maxEval, f, UnivariateSolverUtils.midpoint(min, max)); }
/** * Find a zero near the midpoint of {@code min} and {@code max}. * * @param f Function to solve. * @param min Lower bound for the interval. * @param max Upper bound for the interval. * @param maxEval Maximum number of evaluations. * @return the value where the function is zero. * @throws org.apache.commons.math3.exception.TooManyEvaluationsException * if the maximum evaluation count is exceeded. * @throws org.apache.commons.math3.exception.NumberIsTooLargeException * if {@code min >= max}. */ @Override public double solve(int maxEval, final DifferentiableUnivariateFunction f, final double min, final double max) throws TooManyEvaluationsException { return super.solve(maxEval, f, UnivariateSolverUtils.midpoint(min, max)); }