Class AbstractScalarDifferentiableOptimizer
- java.lang.Object
-
- org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer<DifferentiableMultivariateFunction>
-
- org.apache.commons.math3.optimization.general.AbstractScalarDifferentiableOptimizer
-
- All Implemented Interfaces:
BaseMultivariateOptimizer<DifferentiableMultivariateFunction>,BaseOptimizer<PointValuePair>,DifferentiableMultivariateOptimizer
- Direct Known Subclasses:
NonLinearConjugateGradientOptimizer
@Deprecated public abstract class AbstractScalarDifferentiableOptimizer extends BaseAbstractMultivariateOptimizer<DifferentiableMultivariateFunction> implements DifferentiableMultivariateOptimizer
Deprecated.As of 3.1 (to be removed in 4.0).Base class for implementing optimizers for multivariate scalar differentiable functions. It contains boiler-plate code for dealing with gradient evaluation.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private MultivariateVectorFunctiongradientDeprecated.Objective function gradient.-
Fields inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer
evaluations
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractScalarDifferentiableOptimizer()Deprecated.protectedAbstractScalarDifferentiableOptimizer(ConvergenceChecker<PointValuePair> checker)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected double[]computeObjectiveGradient(double[] evaluationPoint)Deprecated.Compute the gradient vector.PointValuePairoptimize(int maxEval, MultivariateDifferentiableFunction f, GoalType goalType, double[] startPoint)Deprecated.Optimize an objective function.protected PointValuePairoptimizeInternal(int maxEval, DifferentiableMultivariateFunction f, GoalType goalType, double[] startPoint)Deprecated.Optimize an objective function.-
Methods inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer
computeObjectiveValue, doOptimize, getConvergenceChecker, getEvaluations, getGoalType, getLowerBound, getMaxEvaluations, getStartPoint, getUpperBound, optimize, optimize, optimizeInternal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.math3.optimization.BaseMultivariateOptimizer
optimize
-
Methods inherited from interface org.apache.commons.math3.optimization.BaseOptimizer
getConvergenceChecker, getEvaluations, getMaxEvaluations
-
-
-
-
Field Detail
-
gradient
private MultivariateVectorFunction gradient
Deprecated.Objective function gradient.
-
-
Constructor Detail
-
AbstractScalarDifferentiableOptimizer
@Deprecated protected AbstractScalarDifferentiableOptimizer()
Deprecated.Simple constructor with default settings. The convergence check is set to aSimpleValueChecker.
-
AbstractScalarDifferentiableOptimizer
protected AbstractScalarDifferentiableOptimizer(ConvergenceChecker<PointValuePair> checker)
Deprecated.- Parameters:
checker- Convergence checker.
-
-
Method Detail
-
computeObjectiveGradient
protected double[] computeObjectiveGradient(double[] evaluationPoint)
Deprecated.Compute the gradient vector.- Parameters:
evaluationPoint- Point at which the gradient must be evaluated.- Returns:
- the gradient at the specified point.
- Throws:
TooManyEvaluationsException- if the allowed number of evaluations is exceeded.
-
optimizeInternal
protected PointValuePair optimizeInternal(int maxEval, DifferentiableMultivariateFunction f, GoalType goalType, double[] startPoint)
Deprecated.Optimize an objective function.- Overrides:
optimizeInternalin classBaseAbstractMultivariateOptimizer<DifferentiableMultivariateFunction>- Parameters:
maxEval- Maximum number of function evaluations.f- Objective function.goalType- Type of optimization goal: eitherGoalType.MAXIMIZEorGoalType.MINIMIZE.startPoint- Start point for optimization.- Returns:
- the point/value pair giving the optimal value for objective function.
-
optimize
public PointValuePair optimize(int maxEval, MultivariateDifferentiableFunction f, GoalType goalType, double[] startPoint)
Deprecated.Optimize an objective function.- Parameters:
f- Objective function.goalType- Type of optimization goal: eitherGoalType.MAXIMIZEorGoalType.MINIMIZE.startPoint- Start point for optimization.maxEval- Maximum number of function evaluations.- 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.
-
-