protected abstract class BracketSearchMinimizer.Solution extends Object implements UnivariateMinimizer.Solution
Modifier and Type | Field and Description |
---|---|
protected UnivariateRealFunction |
f |
protected double |
fmin
the best minimum found so far
|
protected double |
fnext
the next guess of the minimum
|
protected int |
iter
the current iteration count
|
protected double |
xl
the lower bound of the bracketing interval
|
protected double |
xmin
the best minimizer found so far
|
protected double |
xnext
the next best guess of the minimizer
|
protected double |
xu
the upper bound of the bracketing interval
|
Modifier | Constructor and Description |
---|---|
protected |
Solution(UnivariateRealFunction f) |
Modifier and Type | Method and Description |
---|---|
protected void |
init(double xmin,
double fmin)
Initializes the algorithm states with initial \(x_{min}\) and
\(f_{min}\) before iterations.
|
protected boolean |
isBracketing(double xl,
double x,
double xu)
Check whether [xl, xu] is bracketing x.
|
protected abstract boolean |
isMinFound()
the convergence criterion
|
Double |
minimizer()
Get the minimizer (solution) to the minimization problem.
|
double |
minimum()
Get the (approximate) minimum found.
|
double |
search(double lower,
double initial,
double upper)
Search for a minimum within the interval [lower, upper].
|
protected void |
updateStates()
Update the bracketing interval and the best min found so far.
|
protected abstract double |
xnext()
Compute the next best estimate within the bracketing interval.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
search
protected UnivariateRealFunction f
protected double fmin
protected double fnext
protected double xl
protected double xu
protected double xmin
protected double xnext
protected int iter
protected Solution(UnivariateRealFunction f)
protected void init(double xmin, double fmin)
xmin
- the initial minimum pointfmin
- the function value of the initial minimum pointprotected abstract boolean isMinFound()
true
if the current min value is considered to have converged within a thresholdprotected abstract double xnext()
public double search(double lower, double initial, double upper)
UnivariateMinimizer.Solution
search
in interface UnivariateMinimizer.Solution
lower
- the lower bound for the bracketing interval which contains a minimuminitial
- an initial guessupper
- the upper bound for the bracketing interval which contains a minimumprotected void updateStates()
protected boolean isBracketing(double xl, double x, double xu)
xl
- the lower bound of the bracketing intervalx
- a guess of the minimizerxu
- the upper bound of the bracketing intervaltrue
if fx < fl && fx < fupublic double minimum()
MinimizationSolution
minimum
in interface MinimizationSolution<Double>
public Double minimizer()
MinimizationSolution
minimizer
in interface MinimizationSolution<Double>
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.