Class BaseAbstractUnivariateOptimizer

    • Field Detail

      • evaluations

        private final Incrementor evaluations
        Deprecated.
        Evaluations counter.
      • goal

        private GoalType goal
        Deprecated.
        Optimization type
      • searchMin

        private double searchMin
        Deprecated.
        Lower end of search interval.
      • searchMax

        private double searchMax
        Deprecated.
        Higher end of search interval.
      • searchStart

        private double searchStart
        Deprecated.
        Initial guess .
    • Method Detail

      • getEvaluations

        public int getEvaluations()
        Deprecated.
        Get the number of evaluations of the objective function. The number of evaluations corresponds to the last call to the optimize method. It is 0 if the method has not been called yet.
        Specified by:
        getEvaluations in interface BaseOptimizer<UnivariatePointValuePair>
        Returns:
        the number of evaluations of the objective function.
      • getGoalType

        public GoalType getGoalType()
        Deprecated.
        Returns:
        the optimization type.
      • getMin

        public double getMin()
        Deprecated.
        Returns:
        the lower end of the search interval.
      • getMax

        public double getMax()
        Deprecated.
        Returns:
        the higher end of the search interval.
      • getStartValue

        public double getStartValue()
        Deprecated.
        Returns:
        the initial guess.
      • computeObjectiveValue

        protected double computeObjectiveValue​(double point)
        Deprecated.
        Compute the objective function value.
        Parameters:
        point - Point at which the objective function must be evaluated.
        Returns:
        the objective function value at specified point.
        Throws:
        TooManyEvaluationsException - if the maximal number of evaluations is exceeded.
      • optimize

        public UnivariatePointValuePair optimize​(int maxEval,
                                                 UnivariateFunction f,
                                                 GoalType goalType,
                                                 double min,
                                                 double max,
                                                 double startValue)
        Deprecated.
        Find an optimum in the given interval, start at startValue. An optimizer may require that the interval brackets a single optimum.
        Specified by:
        optimize in interface BaseUnivariateOptimizer<UnivariateFunction>
        Parameters:
        maxEval - Maximum number of function evaluations.
        f - Function to optimize.
        goalType - Type of optimization goal: either GoalType.MAXIMIZE or GoalType.MINIMIZE.
        min - Lower bound for the interval.
        max - Upper bound for the interval.
        startValue - Start value to use.
        Returns:
        a (point, value) pair where the function is optimum.
      • doOptimize

        protected abstract UnivariatePointValuePair doOptimize()
        Deprecated.
        Method for implementing actual optimization algorithms in derived classes.
        Returns:
        the optimum and its corresponding function value.
        Throws:
        TooManyEvaluationsException - if the maximal number of evaluations is exceeded.