From 969ca1e0dfc3dee63b849a52070d288c12d99456 Mon Sep 17 00:00:00 2001 From: Phil Steitz Date: Sat, 15 Jan 2011 19:47:29 +0000 Subject: [PATCH] Moved new method from interface to impl, fixing compatability break. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1059402 13f79535-47bb-0310-9956-ffa450edef68 --- .../solvers/UnivariateRealSolver.java | 21 ------------------- .../solvers/UnivariateRealSolverImpl.java | 19 ++++++++++++++++- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java b/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java index b7d6f1f89..e8edfd162 100644 --- a/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java +++ b/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java @@ -78,27 +78,6 @@ public interface UnivariateRealSolver extends ConvergingAlgorithm { @Deprecated double solve(double min, double max) throws ConvergenceException, MathUserException; - /** - * Solve for a zero root in the given interval. - *

A solver may require that the interval brackets a single zero root. - * Solvers that do require bracketing should be able to handle the case - * where one of the endpoints is itself a root.

- * - * @param f the function to solve. - * @param min the lower bound for the interval. - * @param max the upper bound for the interval. - * @param maxEval Maximum number of evaluations. - * @return a value where the function is zero - * @throws ConvergenceException if the maximum iteration count is exceeded - * or the solver detects convergence problems otherwise. - * @throws MathUserException if an error occurs evaluating the function - * @throws IllegalArgumentException if min > max or the endpoints do not - * satisfy the requirements specified by the solver - * @since 2.2 - */ - double solve(int maxEval, UnivariateRealFunction f, double min, double max) - throws ConvergenceException, MathUserException; - /** * Solve for a zero root in the given interval. *

A solver may require that the interval brackets a single zero root. diff --git a/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java b/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java index 8c260c665..7334a830d 100644 --- a/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java +++ b/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java @@ -136,7 +136,24 @@ public abstract class UnivariateRealSolverImpl functionValueAccuracy = defaultFunctionValueAccuracy; } - /** {@inheritDoc} */ + /** + * Solve for a zero root in the given interval. + *

A solver may require that the interval brackets a single zero root. + * Solvers that do require bracketing should be able to handle the case + * where one of the endpoints is itself a root.

+ * + * @param f the function to solve. + * @param min the lower bound for the interval. + * @param max the upper bound for the interval. + * @param maxEval Maximum number of evaluations. + * @return a value where the function is zero + * @throws ConvergenceException if the maximum iteration count is exceeded + * or the solver detects convergence problems otherwise. + * @throws MathUserException if an error occurs evaluating the function + * @throws IllegalArgumentException if min > max or the endpoints do not + * satisfy the requirements specified by the solver + * @since 2.2 + */ public double solve(int maxEval, UnivariateRealFunction function, double min, double max) throws ConvergenceException, MathUserException { throw MathRuntimeException.createUnsupportedOperationException(LocalizedFormats.NOT_OVERRIDEN);