com.numericalmethod.suanshu.optimization.univariate
Class Brent
java.lang.Object
com.numericalmethod.suanshu.optimization.univariate.BracketSearch
com.numericalmethod.suanshu.optimization.univariate.Brent
public class Brent
- extends BracketSearch
Brent's algorithm is a root-finding algorithm that combines
the bisection method, the secant method and the inverse quadratic interpolation.
It has the reliability of bisection but it can be as quick as some of the less reliable methods.
The idea is to use the secant method or the inverse quadratic interpolation if possible,
because they converge faster,
but to fall back to the more robust bisection method if necessary.
This is the preferred method for finding the minimum for univariate functions.
- See Also:
- Wikipedia: Brent's method
| Fields inherited from class com.numericalmethod.suanshu.optimization.univariate.BracketSearch |
f, tol |
|
Constructor Summary |
Brent()
|
|
Method Summary |
double |
search(int maxIterations,
double lower,
double upper)
Search for a minimum within the interval [lower, upper]. |
double |
search(int maxIterations,
double lower,
double initial,
double upper)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Brent
public Brent()
search
public double search(int maxIterations,
double lower,
double initial,
double upper)
- Overrides:
search in class BracketSearch
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.