Class NewtonSolver
java.lang.Object
org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver<DifferentiableUnivariateFunction>
org.apache.commons.math3.analysis.solvers.AbstractDifferentiableUnivariateSolver
org.apache.commons.math3.analysis.solvers.NewtonSolver
- All Implemented Interfaces:
BaseUnivariateSolver<DifferentiableUnivariateFunction>,DifferentiableUnivariateSolver
Deprecated.
Implements
Newton's Method for finding zeros of real univariate functions.
The function should be continuous but not necessarily smooth.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Construct a solver.NewtonSolver(double absoluteAccuracy) Deprecated.Construct a solver. -
Method Summary
Modifier and TypeMethodDescriptionprotected doubledoSolve()Deprecated.Method for implementing actual optimization algorithms in derived classes.doublesolve(int maxEval, DifferentiableUnivariateFunction f, double min, double max) Deprecated.Find a zero near the midpoint ofminandmax.Methods inherited from class org.apache.commons.math3.analysis.solvers.AbstractDifferentiableUnivariateSolver
computeDerivativeObjectiveValue, setupMethods inherited from class org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver
computeObjectiveValue, getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMax, getMaxEvaluations, getMin, getRelativeAccuracy, getStartValue, incrementEvaluationCount, isBracketing, isSequence, solve, solve, verifyBracketing, verifyInterval, verifySequenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.math3.analysis.solvers.BaseUnivariateSolver
getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve
-
Constructor Details
-
NewtonSolver
public NewtonSolver()Deprecated.Construct a solver. -
NewtonSolver
public NewtonSolver(double absoluteAccuracy) Deprecated.Construct a solver.- Parameters:
absoluteAccuracy- Absolute accuracy.
-
-
Method Details
-
solve
public double solve(int maxEval, DifferentiableUnivariateFunction f, double min, double max) throws TooManyEvaluationsException Deprecated.Find a zero near the midpoint ofminandmax.- Specified by:
solvein interfaceBaseUnivariateSolver<DifferentiableUnivariateFunction>- Overrides:
solvein classBaseAbstractUnivariateSolver<DifferentiableUnivariateFunction>- Parameters:
maxEval- Maximum number of evaluations.f- Function to solve.min- Lower bound for the interval.max- Upper bound for the interval.- Returns:
- the value where the function is zero.
- Throws:
TooManyEvaluationsException- if the maximum evaluation count is exceeded.NumberIsTooLargeException- ifmin >= max.
-
doSolve
Deprecated.Method for implementing actual optimization algorithms in derived classes.- Specified by:
doSolvein classBaseAbstractUnivariateSolver<DifferentiableUnivariateFunction>- Returns:
- the root.
- Throws:
TooManyEvaluationsException- if the maximal number of evaluations is exceeded.
-
NewtonRaphsonSolver