Class BrentMinimizer.Solution

    • Method Detail

      • search

        public double search​(double lower,
                             double initial,
                             double upper)
        Description copied from interface: UnivariateMinimizer.Solution
        Search for a minimum within the interval [lower, upper].
        Specified by:
        search in interface UnivariateMinimizer.Solution
        Overrides:
        search in class BracketSearchMinimizer.Solution
        Parameters:
        lower - the lower bound for the bracketing interval which contains a minimum
        initial - an initial guess
        upper - the upper bound for the bracketing interval which contains a minimum
        Returns:
        an approximate minimizer
      • search

        public double search​(double lower,
                             double upper)
        Description copied from interface: UnivariateMinimizer.Solution
        Search for a minimum within the interval [lower, upper].
        Parameters:
        lower - the lower bound for the bracketing interval which contains a minimum
        upper - the upper bound for the bracketing interval which contains a minimum
        Returns:
        an approximate minimizer
      • init

        protected void init​(double xmin,
                            double fmin)
        Description copied from class: BracketSearchMinimizer.Solution
        Initializes the algorithm states with initial \(x_{min}\) and \(f_{min}\) before iterations. The function value of the initial minimum point is evaluated in this class. If the subclass algorithm needs the computed function value, it can override this method to avoid an unnecessary evaluation. By default, the implementation is empty. If the subclass algorithm does not need to initialize states from the function value, no overriding is needed.
        Overrides:
        init in class BracketSearchMinimizer.Solution
        Parameters:
        xmin - the initial minimum point
        fmin - the function value of the initial minimum point
      • isMinFound

        protected boolean isMinFound()
        the convergence criterion The search stops when
          \((x_u - x_l) < 2 \left | x \right | \varepsilon \) \(\left | \rm xmin - \rm mid \right | < \left | x \right | \varepsilon\)

        \((x_u - x_l) / 2 + \left | \rm xmin - \rm mid \right | < 2 \left | x \right | \varepsilon \approx \rm tol_2\)

        Specified by:
        isMinFound in class BracketSearchMinimizer.Solution
        Returns:
        true if the minimum is found
        See Also:
        "Chapter 10.3, Numerical Recipes."
      • xnext

        protected double xnext()
        Description copied from class: BracketSearchMinimizer.Solution
        Compute the next best estimate within the bracketing interval. A particular univariate minimization algorithm implements the logic in this method.
        Specified by:
        xnext in class BracketSearchMinimizer.Solution
        Returns:
        the next best guess of the minimizer