Class GoldenMinimizer
- java.lang.Object
-
- dev.nm.root.univariate.bracketsearch.BracketSearchMinimizer
-
- dev.nm.root.univariate.bracketsearch.GoldenMinimizer
-
- All Implemented Interfaces:
UnivariateMinimizer
,Minimizer<C2OptimProblem,UnivariateMinimizer.Solution>
,Optimizer<C2OptimProblem,UnivariateMinimizer.Solution>
public class GoldenMinimizer extends BracketSearchMinimizer
This is the golden section univariate minimization algorithm. On each iteration, it 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...) at the newnext
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 inBracketSearchMinimizer
. Choosing the golden section as the bisection ratio gives the fastest convergence among the algorithms that converge linearly. This implementation guarantees that the next guess lies inside the bracketing interval.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GoldenMinimizer.Solution
This is the solution to a Golden section univariate optimization.
-
Field Summary
-
Fields inherited from class dev.nm.root.univariate.bracketsearch.BracketSearchMinimizer
epsilon, maxIterations
-
-
Constructor Summary
Constructors Constructor Description GoldenMinimizer(double epsilon, int maxIterations)
Construct a univariate minimizer using the Golden method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GoldenMinimizer.Solution
solve(C2OptimProblem problem)
Solve an optimization problem, e.g.,OptimProblem
.-
Methods inherited from class dev.nm.root.univariate.bracketsearch.BracketSearchMinimizer
solve
-
-
-
-
Method Detail
-
solve
public GoldenMinimizer.Solution solve(C2OptimProblem problem)
Description copied from interface:Optimizer
Solve an optimization problem, e.g.,OptimProblem
.- Parameters:
problem
- an optimization problem- Returns:
- a solution to the optimization problem
-
-