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@1059406 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
969ca1e0df
commit
d3dda59bef
|
@ -123,28 +123,6 @@ public interface UnivariateRealSolver extends ConvergingAlgorithm {
|
|||
double solve(double min, double max, double startValue)
|
||||
throws ConvergenceException, MathUserException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Solve for a zero in the given interval, start at startValue.
|
||||
* <p>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.</p>
|
||||
*
|
||||
* @param f the function to solve.
|
||||
* @param min the lower bound for the interval.
|
||||
* @param max the upper bound for the interval.
|
||||
* @param startValue the start value to use
|
||||
* @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 arguments do not
|
||||
* satisfy the requirements specified by the solver
|
||||
* @since 2.2
|
||||
*/
|
||||
double solve(int maxEval, UnivariateRealFunction f, double min, double max, double startValue)
|
||||
throws ConvergenceException, MathUserException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Solve for a zero in the given interval, start at startValue.
|
||||
* <p>A solver may require that the interval brackets a single zero root.
|
||||
|
|
|
@ -159,7 +159,25 @@ public abstract class UnivariateRealSolverImpl
|
|||
throw MathRuntimeException.createUnsupportedOperationException(LocalizedFormats.NOT_OVERRIDEN);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
/**
|
||||
* Solve for a zero in the given interval, start at startValue.
|
||||
* <p>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.</p>
|
||||
*
|
||||
* @param f the function to solve.
|
||||
* @param min the lower bound for the interval.
|
||||
* @param max the upper bound for the interval.
|
||||
* @param startValue the start value to use
|
||||
* @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 arguments do not
|
||||
* satisfy the requirements specified by the solver
|
||||
* @since 2.2
|
||||
*/
|
||||
public double solve(int maxEval, UnivariateRealFunction function, double min, double max, double startValue)
|
||||
throws ConvergenceException, MathUserException, IllegalArgumentException {
|
||||
throw MathRuntimeException.createUnsupportedOperationException(LocalizedFormats.NOT_OVERRIDEN);
|
||||
|
|
Loading…
Reference in New Issue