Top Description Fields Constructors Methods
org.apache.commons.math3.optimization.general

public abstract Class AbstractScalarDifferentiableOptimizer

extends BaseAbstractMultivariateOptimizer<DifferentiableMultivariateFunction>
implements DifferentiableMultivariateOptimizer
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.optimization.DifferentiableMultivariateOptimizer, org.apache.commons.math3.optimization.BaseMultivariateOptimizer, org.apache.commons.math3.optimization.BaseOptimizer
Known Direct Subclasses
org.apache.commons.math3.optimization.general.NonLinearConjugateGradientOptimizer
Annotations
@Deprecated
Imports
org.apache.commons.math3.analysis.DifferentiableMultivariateFunction, .MultivariateVectorFunction, .FunctionUtils, org.apache.commons.math3.analysis.differentiation.MultivariateDifferentiableFunction, org.apache.commons.math3.optimization.DifferentiableMultivariateOptimizer, .GoalType, .ConvergenceChecker, .PointValuePair, org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer

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

Modifier and TypeField and Description
private MultivariateVectorFunction
gradient

Objective function gradient.

Inherited from org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer:
evaluations

Constructor Summary

AccessConstructor and Description
protected
protected
AbstractScalarDifferentiableOptimizer(ConvergenceChecker<PointValuePair>
Convergence checker.
checker
)
Deprecated as a consequence of ConvergenceChecker being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected double[]

Returns:

the gradient at the specified point.
computeObjectiveGradient
(final double[]
Point at which the gradient must be evaluated.
evaluationPoint
)

Compute the gradient vector.

public PointValuePair

Returns:

the point/value pair giving the optimal value for objective function.
optimize
(final int
Maximum number of function evaluations.
maxEval
,
final MultivariateDifferentiableFunction
Objective function.
f
,
final GoalType
Type of optimization goal: either GoalType#MAXIMIZE or GoalType#MINIMIZE.
goalType
,
final double[]
Start point for optimization.
startPoint
)

Overrides org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer.optimize.

Implements org.apache.commons.math3.optimization.BaseMultivariateOptimizer.optimize.

Deprecated as a consequence of GoalType and PointValuePair being deprecated.

Optimize an objective function.

protected PointValuePair
optimizeInternal(int
Maximum number of function evaluations.
maxEval
,
final DifferentiableMultivariateFunction
Objective function.
f
,
final GoalType
Type of optimization goal: either GoalType#MAXIMIZE or GoalType#MINIMIZE.
goalType
,
final double[]
Start point for optimization.
startPoint
)

Overrides org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer.optimizeInternal.

Deprecated as a consequence of DifferentiableMultivariateFunction, GoalType and PointValuePair being deprecated.

Optimize an objective function.

Inherited from org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer:
computeObjectiveValuedoOptimizegetConvergenceCheckergetEvaluationsgetGoalTypegetLowerBoundgetMaxEvaluationsgetStartPointgetUpperBoundoptimizeoptimizeInternal

Field Detail

gradientback to summary
private MultivariateVectorFunction gradient

Objective function gradient.

Constructor Detail

AbstractScalarDifferentiableOptimizerback to summary
protected AbstractScalarDifferentiableOptimizer()

Simple constructor with default settings. The convergence check is set to a SimpleValueChecker.

Annotations
@Deprecated
AbstractScalarDifferentiableOptimizerback to summary
protected AbstractScalarDifferentiableOptimizer(ConvergenceChecker<PointValuePair> checker)

Deprecated

as a consequence of ConvergenceChecker being deprecated. See corresponding docs for further information.

Parameters
checker:ConvergenceChecker<PointValuePair>

Convergence checker.

Method Detail

computeObjectiveGradientback to summary
protected double[] computeObjectiveGradient(final double[] evaluationPoint)

Compute the gradient vector.

Parameters
evaluationPoint:double[]

Point at which the gradient must be evaluated.

Returns:double[]

the gradient at the specified point.

Exceptions
TooManyEvaluationsException:
if the allowed number of evaluations is exceeded.
optimizeback to summary
public PointValuePair optimize(final int maxEval, final MultivariateDifferentiableFunction f, final GoalType goalType, final double[] startPoint)

Overrides org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer.optimize.

Implements org.apache.commons.math3.optimization.BaseMultivariateOptimizer.optimize.

Deprecated

as a consequence of GoalType and PointValuePair being deprecated. See corresponding docs for further information.

Optimize an objective function.

Parameters
maxEval:int

Maximum number of function evaluations.

f:MultivariateDifferentiableFunction

Objective function.

goalType:GoalType

Type of optimization goal: either GoalType#MAXIMIZE or GoalType#MINIMIZE.

startPoint:double[]

Start point for optimization.

Returns:PointValuePair

the point/value pair giving the optimal value for objective function.

Exceptions
DimensionMismatchException:
if the start point dimension is wrong.
TooManyEvaluationsException:
if the maximal number of evaluations is exceeded.
NullArgumentException:
if any argument is null.
optimizeInternalback to summary
protected PointValuePair optimizeInternal(int maxEval, final DifferentiableMultivariateFunction f, final GoalType goalType, final double[] startPoint)

Overrides org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer.optimizeInternal.

Doc from org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer.optimizeInternal.

Deprecated

as a consequence of DifferentiableMultivariateFunction, GoalType and PointValuePair being deprecated. See corresponding docs for further information.

Optimize an objective function.

Parameters
maxEval:int

Maximum number of function evaluations.

f:DifferentiableMultivariateFunction

Objective function.

goalType:GoalType

Type of optimization goal: either GoalType#MAXIMIZE or GoalType#MINIMIZE.

startPoint:double[]

Start point for optimization.

Returns:PointValuePair

the point/value pair giving the optimal value for objective function.

Annotations
@Override