/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value and derivative at specified point. * @throws TooManyEvaluationsException * if the maximal number of evaluations is exceeded. */ protected DerivativeStructure computeObjectiveValueAndDerivative(double point) throws TooManyEvaluationsException { incrementEvaluationCount(); return function.value(new DerivativeStructure(1, 1, 0, point)); }
/** * 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 UnivariateDifferentiableFunction 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 UnivariateDifferentiableFunction f, final double min, final double max) throws TooManyEvaluationsException { return super.solve(maxEval, f, UnivariateSolverUtils.midpoint(min, max)); }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value and derivative at specified point. * @throws TooManyEvaluationsException * if the maximal number of evaluations is exceeded. */ protected DerivativeStructure computeObjectiveValueAndDerivative(double point) throws TooManyEvaluationsException { incrementEvaluationCount(); return function.value(new DerivativeStructure(1, 1, 0, point)); }
/** * 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 UnivariateDifferentiableFunction f, final double min, final double max) throws TooManyEvaluationsException { return super.solve(maxEval, f, UnivariateSolverUtils.midpoint(min, max)); }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value and derivative at specified point. * @throws TooManyEvaluationsException * if the maximal number of evaluations is exceeded. */ protected DerivativeStructure computeObjectiveValueAndDerivative(double point) throws TooManyEvaluationsException { incrementEvaluationCount(); return function.value(new DerivativeStructure(1, 1, 0, point)); }