org.apache.commons.math3.optimization.univariate
Class BaseAbstractUnivariateOptimizer
- java.lang.Object
-
- org.apache.commons.math3.optimization.univariate.BaseAbstractUnivariateOptimizer
-
- All Implemented Interfaces:
- BaseOptimizer<UnivariatePointValuePair>, BaseUnivariateOptimizer<UnivariateFunction>, UnivariateOptimizer
- Direct Known Subclasses:
- BrentOptimizer
Deprecated.As of 3.1 (to be removed in 4.0).
@Deprecated public abstract class BaseAbstractUnivariateOptimizer extends java.lang.Object implements UnivariateOptimizer
Provide a default implementation for several functions useful to generic optimizers.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description ConvergenceChecker<UnivariatePointValuePair>getConvergenceChecker()Deprecated.Get the convergence checker.intgetEvaluations()Deprecated.Get the number of evaluations of the objective function.GoalTypegetGoalType()Deprecated.doublegetMax()Deprecated.intgetMaxEvaluations()Deprecated.Get the maximal number of function evaluations.doublegetMin()Deprecated.doublegetStartValue()Deprecated.UnivariatePointValuePairoptimize(int maxEval, UnivariateFunction f, GoalType goalType, double min, double max)Deprecated.Find an optimum in the given interval.UnivariatePointValuePairoptimize(int maxEval, UnivariateFunction f, GoalType goalType, double min, double max, double startValue)Deprecated.Find an optimum in the given interval, start at startValue.
-
-
-
Method Detail
-
getMaxEvaluations
public int getMaxEvaluations()
Deprecated.Get the maximal number of function evaluations.- Specified by:
getMaxEvaluationsin interfaceBaseOptimizer<UnivariatePointValuePair>- Returns:
- the maximal number of function evaluations.
-
getEvaluations
public int getEvaluations()
Deprecated.Get the number of evaluations of the objective function. The number of evaluations corresponds to the last call to theoptimizemethod. It is 0 if the method has not been called yet.- Specified by:
getEvaluationsin interfaceBaseOptimizer<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.
-
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:
optimizein interfaceBaseUnivariateOptimizer<UnivariateFunction>- Parameters:
maxEval- Maximum number of function evaluations.f- Function to optimize.goalType- Type of optimization goal: eitherGoalType.MAXIMIZEorGoalType.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.
-
optimize
public UnivariatePointValuePair optimize(int maxEval, UnivariateFunction f, GoalType goalType, double min, double max)
Deprecated.Find an optimum in the given interval. An optimizer may require that the interval brackets a single optimum.- Specified by:
optimizein interfaceBaseUnivariateOptimizer<UnivariateFunction>- Parameters:
maxEval- Maximum number of function evaluations.f- Function to optimize.goalType- Type of optimization goal: eitherGoalType.MAXIMIZEorGoalType.MINIMIZE.min- Lower bound for the interval.max- Upper bound for the interval.- Returns:
- a (point, value) pair where the function is optimum.
-
getConvergenceChecker
public ConvergenceChecker<UnivariatePointValuePair> getConvergenceChecker()
Deprecated.Get the convergence checker.- Specified by:
getConvergenceCheckerin interfaceBaseOptimizer<UnivariatePointValuePair>- Returns:
- the object used to check for convergence.
-
-
DMelt 3.0 © DataMelt by jWork.ORG