Class BracketFinder


  • public class BracketFinder
    extends Object
    Provide an interval that brackets a local optimum of a function. This code is based on a Python implementation (from SciPy, module optimize.py v0.5).
    Since:
    2.2
    • Constructor Detail

      • BracketFinder

        public BracketFinder​(double growLimit,
                             int maxEvaluations)
        Create a bracketing interval finder.
        Parameters:
        growLimit - Expanding factor.
        maxEvaluations - Maximum number of evaluations allowed for finding a bracketing interval.
    • Method Detail

      • search

        public void search​(UnivariateFunction func,
                           GoalType goal,
                           double xA,
                           double xB)
        Search new points that bracket a local optimum of the function.
        Parameters:
        func - Function whose optimum should be bracketed.
        goal - Goal type.
        xA - Initial point.
        xB - Initial point.
        Throws:
        TooManyEvaluationsException - if the maximum number of evaluations is exceeded.
      • getMaxEvaluations

        public int getMaxEvaluations()
        Returns:
        the number of evaluations.
      • getEvaluations

        public int getEvaluations()
        Returns:
        the number of evaluations.
      • getLo

        public double getLo()
        Returns:
        the lower bound of the bracket.
        See Also:
        getFLo()
      • getHi

        public double getHi()
        Returns:
        the higher bound of the bracket.
        See Also:
        getFHi()
      • getMid

        public double getMid()
        Returns:
        a point in the middle of the bracket.
        See Also:
        getFMid()