Class 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 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.
    • 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