# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.univariate.bracketsearch

## Class GoldenMinimizer

• All Implemented Interfaces:
Minimizer<C2OptimProblem,UnivariateMinimizer.Solution>, Optimizer<C2OptimProblem,UnivariateMinimizer.Solution>, UnivariateMinimizer

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 new next 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 in BracketSearchMinimizer. 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 and Description
class  GoldenMinimizer.Solution
This is the solution to a Golden section univariate optimization.

• ### Fields inherited from class com.numericalmethod.suanshu.optimization.univariate.bracketsearch.BracketSearchMinimizer

epsilon, maxIterations
• ### Constructor Summary

Constructors
Constructor and Description
GoldenMinimizer(double epsilon, int maxIterations)
Construct a univariate minimizer using the Golden method.
• ### Method Summary

All Methods
Modifier and Type Method and Description
GoldenMinimizer.Solution solve(C2OptimProblem problem)
Solve an optimization problem, e.g., OptimProblem.
• ### Methods inherited from class com.numericalmethod.suanshu.optimization.univariate.bracketsearch.BracketSearchMinimizer

solve
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### GoldenMinimizer

public GoldenMinimizer(double epsilon,
int maxIterations)
Construct a univariate minimizer using the Golden method.
Parameters:
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
maxIterations - the maximum number of iterations
• ### 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