Package jebl.math
Class UnivariateMinimum
java.lang.Object
jebl.math.UnivariateMinimum
minimization of a real-valued function of one variable
without using derivatives.
algorithm: Brent's golden section method (Richard P. Brent. 1973. Algorithms for finding zeros and extrema of functions without calculating derivatives. Prentice-Hall.)
- Version:
- $Id: UnivariateMinimum.java 526 2006-11-13 20:45:42Z nut $
- Author:
- Korbinian Strimmer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
findMinimum
(double x, UnivariateFunction f) Find minimum (first estimate given)double
findMinimum
(double x, UnivariateFunction f, int fracDigits) Find minimum (first estimate given, desired number of fractional digits specified)double
Find minimum (no first estimate given)double
findMinimum
(UnivariateFunction f, int fracDigits) Find minimum (no first estimate given, desired number of fractional digits specified)double
optimize
(double x, UnivariateFunction f, double tol) The actual optimization routine (Brent's golden section method)double
optimize
(double x, UnivariateFunction f, double tol, double lowerBound, double upperBound) The actual optimization routine (Brent's golden section method)double
optimize
(UnivariateFunction f, double tol) The actual optimization routine (Brent's golden section method)double
optimize
(UnivariateFunction f, double tol, double lowerBound, double upperBound) The actual optimization routine (Brent's golden section method)
-
Field Details
-
minx
public double minxlast minimum -
fminx
public double fminxfunction value at minimum -
f2minx
public double f2minxcurvature at minimum -
numFun
public int numFuntotal number of function evaluations neccessary -
maxFun
public int maxFunmaximum number of function evaluations (default 0 indicates no limit on calls)
-
-
Constructor Details
-
UnivariateMinimum
public UnivariateMinimum()
-
-
Method Details
-
findMinimum
Find minimum (first estimate given)- Parameters:
x
- first estimatef
- function- Returns:
- position of minimum
-
findMinimum
Find minimum (first estimate given, desired number of fractional digits specified)- Parameters:
x
- first estimatef
- functionfracDigits
- desired fractional digits- Returns:
- position of minimum
-
findMinimum
Find minimum (no first estimate given)- Parameters:
f
- function- Returns:
- position of minimum
-
findMinimum
Find minimum (no first estimate given, desired number of fractional digits specified)- Parameters:
f
- functionfracDigits
- desired fractional digits- Returns:
- position of minimum
-
optimize
The actual optimization routine (Brent's golden section method)- Parameters:
f
- univariate functiontol
- absolute tolerance of each parameterlowerBound
- the lower bound of inputupperBound
- the upper bound of input- Returns:
- position of minimum
-
optimize
The actual optimization routine (Brent's golden section method)- Parameters:
f
- univariate functiontol
- absolute tolerance of each parameter- Returns:
- position of minimum
-
optimize
public double optimize(double x, UnivariateFunction f, double tol, double lowerBound, double upperBound) The actual optimization routine (Brent's golden section method)- Parameters:
x
- initial guessf
- univariate functiontol
- absolute tolerance of each parameterlowerBound
- the lower bound of inputupperBound
- the upper bound of input- Returns:
- position of minimum
-
optimize
The actual optimization routine (Brent's golden section method)- Parameters:
x
- initial guessf
- univariate functiontol
- absolute tolerance of each parameter note bounded by the given bounds of the function f- Returns:
- position of minimum
-