public class NewtonRaphsonSolver extends AbstractUnivariateDifferentiableSolver
Modifier and Type | Field and Description |
---|---|
private static double |
DEFAULT_ABSOLUTE_ACCURACY
Default absolute accuracy.
|
Constructor and Description |
---|
NewtonRaphsonSolver()
Construct a solver.
|
NewtonRaphsonSolver(double absoluteAccuracy)
Construct a solver.
|
Modifier and Type | Method and Description |
---|---|
protected double |
doSolve()
Method for implementing actual optimization algorithms in derived
classes.
|
double |
solve(int maxEval,
UnivariateDifferentiableFunction f,
double min,
double max)
Find a zero near the midpoint of
min and max . |
computeObjectiveValueAndDerivative, setup
computeObjectiveValue, getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMax, getMaxEvaluations, getMin, getRelativeAccuracy, getStartValue, incrementEvaluationCount, isBracketing, isSequence, solve, solve, verifyBracketing, verifyInterval, verifySequence
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve
private static final double DEFAULT_ABSOLUTE_ACCURACY
public NewtonRaphsonSolver()
public NewtonRaphsonSolver(double absoluteAccuracy)
absoluteAccuracy
- Absolute accuracy.public double solve(int maxEval, UnivariateDifferentiableFunction f, double min, double max) throws TooManyEvaluationsException
min
and max
.solve
in interface BaseUnivariateSolver<UnivariateDifferentiableFunction>
solve
in class BaseAbstractUnivariateSolver<UnivariateDifferentiableFunction>
f
- Function to solve.min
- Lower bound for the interval.max
- Upper bound for the interval.maxEval
- Maximum number of evaluations.TooManyEvaluationsException
- if the maximum evaluation count is exceeded.NumberIsTooLargeException
- if min >= max
.protected double doSolve() throws TooManyEvaluationsException
doSolve
in class BaseAbstractUnivariateSolver<UnivariateDifferentiableFunction>
TooManyEvaluationsException
- if the maximal number of evaluations
is exceeded.Copyright (c) 2003-2014 Apache Software Foundation