public class UnivariateMinimum extends Object
algorithm: Brent's golden section method (Richard P. Brent. 1973. Algorithms for finding zeros and extrema of functions without calculating derivatives. Prentice-Hall.)
Modifier and Type | Field and Description |
---|---|
double |
f2minx
curvature at minimum
|
double |
fminx
function value at minimum
|
int |
maxFun
maximum number of function evaluations
(default 0 indicates no limit on calls)
|
double |
minx
last minimum
|
int |
numFun
total number of function evaluations neccessary
|
Constructor and Description |
---|
UnivariateMinimum() |
Modifier and Type | Method and Description |
---|---|
double |
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 |
findMinimum(UnivariateFunction f)
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(UnivariateFunction f,
double tol)
The actual optimization routine (Brent's golden section method)
|
public double minx
public double fminx
public double f2minx
public int numFun
public int maxFun
public double findMinimum(double x, UnivariateFunction f)
x
- first estimatef
- functionpublic double findMinimum(double x, UnivariateFunction f, int fracDigits)
x
- first estimatef
- functionfracDigits
- desired fractional digitspublic double findMinimum(UnivariateFunction f)
f
- functionpublic double findMinimum(UnivariateFunction f, int fracDigits)
f
- functionfracDigits
- desired fractional digitspublic double optimize(UnivariateFunction f, double tol)
f
- univariate functiontol
- absolute tolerance of each parameterpublic double optimize(double x, UnivariateFunction f, double tol)
x
- initial guessf
- univariate functiontol
- absolute tolerance of each parameterCopyright © 2015–2021 Fiji. All rights reserved.