public class NewtonSolver extends UnivariateRealSolverImpl
The function should be continuous but not necessarily smooth.
defaultFunctionValueAccuracy, f, functionValue, functionValueAccuracy, result, resultComputed
absoluteAccuracy, defaultAbsoluteAccuracy, defaultMaximalIterationCount, defaultRelativeAccuracy, iterationCount, maximalIterationCount, relativeAccuracy
Constructor and Description |
---|
NewtonSolver()
Deprecated.
in 2.2 (to be removed in 3.0).
|
NewtonSolver(DifferentiableUnivariateRealFunction f)
Deprecated.
as of 2.0 the function to solve is passed as an argument
to the
solve(UnivariateRealFunction, double, double) or
UnivariateRealSolver.solve(UnivariateRealFunction, double, double, double)
method. |
Modifier and Type | Method and Description |
---|---|
double |
solve(double min,
double max)
Deprecated.
|
double |
solve(double min,
double max,
double startValue)
Deprecated.
|
double |
solve(int maxEval,
UnivariateRealFunction f,
double min,
double max)
Find a zero near the midpoint of
min and max . |
double |
solve(int maxEval,
UnivariateRealFunction f,
double min,
double max,
double startValue)
Find a zero near the value
startValue . |
double |
solve(UnivariateRealFunction f,
double min,
double max)
Deprecated.
in 2.2 (to be removed in 3.0).
|
double |
solve(UnivariateRealFunction f,
double min,
double max,
double startValue)
Deprecated.
in 2.2 (to be removed in 3.0).
|
checkResultComputed, clearResult, getFunctionValue, getFunctionValueAccuracy, getResult, isBracketing, isSequence, resetFunctionValueAccuracy, setFunctionValueAccuracy, setResult, setResult, verifyBracketing, verifyInterval, verifySequence
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, incrementIterationsCounter, resetAbsoluteAccuracy, resetIterationsCounter, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, resetAbsoluteAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy
@Deprecated public NewtonSolver(DifferentiableUnivariateRealFunction f)
solve(UnivariateRealFunction, double, double)
or
UnivariateRealSolver.solve(UnivariateRealFunction, double, double, double)
method.f
- function to solve.@Deprecated public NewtonSolver()
@Deprecated public double solve(double min, double max) throws MaxIterationsExceededException, FunctionEvaluationException
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.
min
- the lower bound for the interval.max
- the upper bound for the interval.FunctionEvaluationException
- if an error occurs evaluating the functionMaxIterationsExceededException
@Deprecated public double solve(double min, double max, double startValue) throws MaxIterationsExceededException, FunctionEvaluationException
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.
min
- the lower bound for the interval.max
- the upper bound for the interval.startValue
- the start value to useFunctionEvaluationException
- if an error occurs evaluating the functionMaxIterationsExceededException
public double solve(int maxEval, UnivariateRealFunction f, double min, double max) throws MaxIterationsExceededException, FunctionEvaluationException
min
and max
.solve
in class UnivariateRealSolverImpl
f
- the function to solvemin
- the lower bound for the intervalmax
- the upper bound for the intervalmaxEval
- Maximum number of evaluations.MaxIterationsExceededException
- if the maximum iteration count is exceededFunctionEvaluationException
- if an error occurs evaluating the function or derivativejava.lang.IllegalArgumentException
- if min is not less than max@Deprecated public double solve(UnivariateRealFunction f, double min, double max) throws MaxIterationsExceededException, FunctionEvaluationException
min
and max
.f
- the function to solvemin
- the lower bound for the intervalmax
- the upper bound for the intervalMaxIterationsExceededException
- if the maximum iteration count is exceededFunctionEvaluationException
- if an error occurs evaluating the function or derivativejava.lang.IllegalArgumentException
- if min is not less than maxpublic double solve(int maxEval, UnivariateRealFunction f, double min, double max, double startValue) throws MaxIterationsExceededException, FunctionEvaluationException
startValue
.solve
in class UnivariateRealSolverImpl
f
- the function to solvemin
- the lower bound for the interval (ignored).max
- the upper bound for the interval (ignored).startValue
- the start value to use.maxEval
- Maximum number of evaluations.MaxIterationsExceededException
- if the maximum iteration count is exceededFunctionEvaluationException
- if an error occurs evaluating the function or derivativejava.lang.IllegalArgumentException
- if startValue is not between min and max or
if function is not a DifferentiableUnivariateRealFunction
instance@Deprecated public double solve(UnivariateRealFunction f, double min, double max, double startValue) throws MaxIterationsExceededException, FunctionEvaluationException
startValue
.f
- the function to solvemin
- the lower bound for the interval (ignored).max
- the upper bound for the interval (ignored).startValue
- the start value to use.MaxIterationsExceededException
- if the maximum iteration count is exceededFunctionEvaluationException
- if an error occurs evaluating the function or derivativejava.lang.IllegalArgumentException
- if startValue is not between min and max or
if function is not a DifferentiableUnivariateRealFunction
instanceCopyright (c) 2003-2016 Apache Software Foundation