Class BaseAbstractMultivariateOptimizer<FUNC extends MultivariateFunction>
java.lang.Object
org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer<FUNC>
- Type Parameters:
FUNC
- Type of the objective function to be optimized.
- All Implemented Interfaces:
BaseMultivariateOptimizer<FUNC>
,BaseOptimizer<PointValuePair>
- Direct Known Subclasses:
AbstractDifferentiableOptimizer
,AbstractScalarDifferentiableOptimizer
,BaseAbstractMultivariateSimpleBoundsOptimizer
,PowellOptimizer
,SimplexOptimizer
@Deprecated
public abstract class BaseAbstractMultivariateOptimizer<FUNC extends MultivariateFunction>
extends Object
implements BaseMultivariateOptimizer<FUNC>
Deprecated.
As of 3.1 (to be removed in 4.0).
Base class for implementing optimizers for multivariate scalar functions.
This base class handles the boiler-plate methods associated to thresholds,
evaluations counting, initial guess and simple bounds settings.
- Since:
- 2.2
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Deprecated.protected
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected double
computeObjectiveValue
(double[] point) Deprecated.Compute the objective function value.protected abstract PointValuePair
Deprecated.Perform the bulk of the optimization algorithm.Deprecated.Get the convergence checker.int
Deprecated.Get the number of evaluations of the objective function.Deprecated.double[]
Deprecated.int
Deprecated.Get the maximal number of function evaluations.double[]
Deprecated.double[]
Deprecated.Deprecated.As of 3.1.optimize
(int maxEval, FUNC f, GoalType goalType, OptimizationData... optData) Deprecated.Optimize an objective function.protected PointValuePair
optimizeInternal
(int maxEval, FUNC f, GoalType goalType, double[] startPoint) Deprecated.As of 3.1.protected PointValuePair
optimizeInternal
(int maxEval, FUNC f, GoalType goalType, OptimizationData... optData) Deprecated.Optimize an objective function.
-
Field Details
-
evaluations
Deprecated.Evaluations counter.
-
-
Constructor Details
-
BaseAbstractMultivariateOptimizer
Deprecated.Simple constructor with default settings. The convergence check is set to aSimpleValueChecker
. -
BaseAbstractMultivariateOptimizer
Deprecated.- Parameters:
checker
- Convergence checker.
-
-
Method Details
-
getMaxEvaluations
public int getMaxEvaluations()Deprecated.Get the maximal number of function evaluations.- Specified by:
getMaxEvaluations
in interfaceBaseOptimizer<FUNC extends MultivariateFunction>
- 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 theoptimize
method. It is 0 if the method has not been called yet.- Specified by:
getEvaluations
in interfaceBaseOptimizer<FUNC extends MultivariateFunction>
- Returns:
- the number of evaluations of the objective function.
-
getConvergenceChecker
Deprecated.Get the convergence checker.- Specified by:
getConvergenceChecker
in interfaceBaseOptimizer<FUNC extends MultivariateFunction>
- Returns:
- the object used to check for convergence.
-
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 the specified point.
- Throws:
TooManyEvaluationsException
- if the maximal number of evaluations is exceeded.
-
optimize
@Deprecated public PointValuePair optimize(int maxEval, FUNC f, GoalType goalType, double[] startPoint) Deprecated.As of 3.1. Please useoptimize(int,MultivariateFunction,GoalType,OptimizationData[])
instead.Optimize an objective function.- Specified by:
optimize
in interfaceBaseMultivariateOptimizer<FUNC extends MultivariateFunction>
- Parameters:
maxEval
- Maximum number of function evaluations.f
- Objective function.goalType
- Type of optimization goal: eitherGoalType.MAXIMIZE
orGoalType.MINIMIZE
.startPoint
- Start point for optimization.- Returns:
- the point/value pair giving the optimal value for objective function.
-
optimize
Deprecated.Optimize an objective function.- Parameters:
maxEval
- Allowed number of evaluations of the objective function.f
- Objective function.goalType
- Optimization type.optData
- Optimization data. The following data will be looked for:- Returns:
- the point/value pair giving the optimal value of the objective function.
- Since:
- 3.1
-
optimizeInternal
@Deprecated protected PointValuePair optimizeInternal(int maxEval, FUNC f, GoalType goalType, double[] startPoint) Deprecated.As of 3.1. Please useoptimize(int,MultivariateFunction,GoalType,OptimizationData[])
instead.Optimize an objective function.- Parameters:
maxEval
- Maximum number of function evaluations.f
- Objective function.goalType
- Type of optimization goal: eitherGoalType.MAXIMIZE
orGoalType.MINIMIZE
.startPoint
- Start point for optimization.- Returns:
- the point/value pair giving the optimal value for objective function.
- Throws:
DimensionMismatchException
- if the start point dimension is wrong.TooManyEvaluationsException
- if the maximal number of evaluations is exceeded.NullArgumentException
- if any argument isnull
.
-
optimizeInternal
protected PointValuePair optimizeInternal(int maxEval, FUNC f, GoalType goalType, OptimizationData... optData) throws TooManyEvaluationsException Deprecated.Optimize an objective function.- Parameters:
maxEval
- Allowed number of evaluations of the objective function.f
- Objective function.goalType
- Optimization type.optData
- Optimization data. The following data will be looked for:- Returns:
- the point/value pair giving the optimal value of the objective function.
- Throws:
TooManyEvaluationsException
- if the maximal number of evaluations is exceeded.- Since:
- 3.1
-
getGoalType
Deprecated.- Returns:
- the optimization type.
-
getStartPoint
public double[] getStartPoint()Deprecated.- Returns:
- the initial guess.
-
getLowerBound
public double[] getLowerBound()Deprecated.- Returns:
- the lower bounds.
- Since:
- 3.1
-
getUpperBound
public double[] getUpperBound()Deprecated.- Returns:
- the upper bounds.
- Since:
- 3.1
-
doOptimize
Deprecated.Perform the bulk of the optimization algorithm.- Returns:
- the point/value pair giving the optimal value of the objective function.
-