com.numericalmethod.suanshu.optimization.univariate
Class Golden
java.lang.Object
com.numericalmethod.suanshu.optimization.univariate.BracketSearch
com.numericalmethod.suanshu.optimization.univariate.Golden
public class Golden
- extends BracketSearch
Minimum finding algorithm by the golden section.
On each iteration, the algorithm compares the distances to the lower and upper ends of the bracketing interval.
The bigger sub-interval is divided by the golden section (about 0.3189660...) by the next point.
The value of the function at this new point is calculated and compared to the current minimum.
A new bracketing interval is then chosen in the usual manner as in BracketSearch.
Choosing the golden section as the bisection ratio gives the fastest convergence among the algorithms that converge linearly.
This implementation is much simpler than that of Fibonacci.
It does not run the risk that the next guess lies outside the bracketing interval.
| Fields inherited from class com.numericalmethod.suanshu.optimization.univariate.BracketSearch |
f, tol |
|
Method Summary |
double |
search(int maxIterations,
double lower,
double upper)
Search for a minimum within the interval [lower, upper]. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Golden
public Golden()
search
public double search(int maxIterations,
double lower,
double upper)
- Search for a minimum within the interval
[lower, upper].
- Parameters:
maxIterations - number of iterationslower - lower bound for the bracketing interval which contains a minimumupper - upper bound for the bracketing interval which contains a minimum
- Returns:
- an approximate minimizer
Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.