Muller's method applies to both real and complex functions, but here we
restrict ourselves to real functions.
This class differs from MullerSolver in the way it avoids complex
operations.
Muller's original method would have function evaluation at complex point. Since our f(x) is real, we have to find ways to avoid that. Bracketing condition is one way to go: by requiring bracketing in every iteration, the newly computed approximation is guaranteed to be real.
Normally Muller's method converges quadratically in the vicinity of a zero, however it may be very slow in regions far away from zeros. For example, f(x) = exp(x) - 1, min = -50, max = 100. In such case we use bisection as a safety backup if it performs very poorly.
The formulas here use divided differences directly.
MullerSolver2
| Modifier and Type | Field and Description |
|---|---|
| private static final double | DEFAULT_ABSOLUTE_ACCURACY
Default absolute accuracy. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | MullerSolver(double
Relative accuracy. relativeAccuracy, double Absolute accuracy. absoluteAccuracy)Construct a solver. |
| Modifier and Type | Method and Description |
|---|---|
| protected double | doSolve()
Implements abstract org. Method for implementing actual optimization algorithms in derived classes. |
| private double | Returns: the point at which the function value is zero.Lower bound for the interval. min, double Upper bound for the interval. max, double function value at the lower bound. fMin, double function value at the upper bound. fMax)Find a real root in the given interval. |
| DEFAULT_ABSOLUTE_ACCURACY | back to summary |
|---|---|
| private static final double DEFAULT_ABSOLUTE_ACCURACY Default absolute accuracy. | |
| MullerSolver | back to summary |
|---|---|
| public MullerSolver() Construct a solver with default accuracy (1e-6). | |
| MullerSolver | back to summary |
|---|---|
| public MullerSolver(double absoluteAccuracy) Construct a solver.
| |
| MullerSolver | back to summary |
|---|---|
| public MullerSolver(double relativeAccuracy, double absoluteAccuracy) Construct a solver.
| |
| doSolve | back to summary |
|---|---|
| protected double doSolve() throws TooManyEvaluationsException, NumberIsTooLargeException, NoBracketingException Implements abstract org. Doc from org. Method for implementing actual optimization algorithms in derived classes.
| |
| solve | back to summary |
|---|---|
| private double solve(double min, double max, double fMin, double fMax) throws TooManyEvaluationsException Find a real root in the given interval.
| |