Top Description Fields Constructors Methods
org.apache.commons.math3.optim.nonlinear.scalar

public abstract Class MultivariateOptimizer

extends BaseMultivariateOptimizer<PointValuePair>
Class Inheritance
Known Direct Subclasses
org.apache.commons.math3.optim.nonlinear.scalar.noderiv.BOBYQAOptimizer, org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CMAESOptimizer, org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer, org.apache.commons.math3.optim.nonlinear.scalar.noderiv.SimplexOptimizer, org.apache.commons.math3.optim.linear.LinearOptimizer, org.apache.commons.math3.optim.nonlinear.scalar.GradientMultivariateOptimizer
Imports
org.apache.commons.math3.analysis.MultivariateFunction, org.apache.commons.math3.optim.BaseMultivariateOptimizer, .OptimizationData, .ConvergenceChecker, .PointValuePair, org.apache.commons.math3.exception.TooManyEvaluationsException

Base class for a multivariate scalar function optimizer.
Since
3.1

Field Summary

Modifier and TypeField and Description
private MultivariateFunction
function

Objective function.

private GoalType
goal

Type of optimization.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

the objective function value at the specified point.
computeObjectiveValue
(double[]
Point at which the objective function must be evaluated.
params
)

Computes the objective function value.

public GoalType

Returns:

the optimization type.
getGoalType
()

public PointValuePair

Returns:

a point/value pair that satisfies the convergence criteria.
optimize
(OptimizationData...
Optimization data. In addition to those documented in BaseMultivariateOptimizer, this method will register the following data:
optData
)

Overrides org.apache.commons.math3.optim.BaseMultivariateOptimizer.optimize.

Stores data and performs the optimization.

protected void
parseOptimizationData(OptimizationData...
Optimization data. The following data will be looked for:
optData
)

Overrides org.apache.commons.math3.optim.BaseMultivariateOptimizer.parseOptimizationData.

Scans the list of (required and optional) optimization data that characterize the problem.

Inherited from org.apache.commons.math3.optim.BaseMultivariateOptimizer:
getLowerBoundgetStartPointgetUpperBound

Field Detail

functionback to summary
private MultivariateFunction function

Objective function.

goalback to summary
private GoalType goal

Type of optimization.

Constructor Detail

MultivariateOptimizerback to summary
protected MultivariateOptimizer(ConvergenceChecker<PointValuePair> checker)
Parameters
checker:ConvergenceChecker<PointValuePair>

Convergence checker.

Method Detail

computeObjectiveValueback to summary
public double computeObjectiveValue(double[] params)

Computes the objective function value. This method must be called by subclasses to enforce the evaluation counter limit.

Parameters
params:double[]

Point at which the objective function must be evaluated.

Returns:double

the objective function value at the specified point.

Exceptions
TooManyEvaluationsException:
if the maximal number of evaluations is exceeded.
getGoalTypeback to summary
public GoalType getGoalType()
Returns:GoalType

the optimization type.

optimizeback to summary
public PointValuePair optimize(OptimizationData... optData) throws TooManyEvaluationsException

Overrides org.apache.commons.math3.optim.BaseMultivariateOptimizer.optimize.

Doc from org.apache.commons.math3.optim.BaseMultivariateOptimizer.optimize.

Stores data and performs the optimization.

The list of parameters is open-ended so that sub-classes can extend it with arguments specific to their concrete implementations.

When the method is called multiple times, instance data is overwritten only when actually present in the list of arguments: when not specified, data set in a previous call is retained (and thus is optional in subsequent calls).

Important Note

Subclasses must override parseOptimizationData(OptimizationData[]) if they need to register their own options; but then, they must also call super.parseOptimizationData(optData) within that method.

Parameters
optData:OptimizationData[]

Optimization data. In addition to those documented in BaseMultivariateOptimizer, this method will register the following data:

Returns:PointValuePair

a point/value pair that satisfies the convergence criteria.

Annotations
@Override
Exceptions
TooManyEvaluationsException:
if the maximal number of evaluations is exceeded.
parseOptimizationDataback to summary
protected void parseOptimizationData(OptimizationData... optData)

Overrides org.apache.commons.math3.optim.BaseMultivariateOptimizer.parseOptimizationData.

Scans the list of (required and optional) optimization data that characterize the problem.

Parameters
optData:OptimizationData[]

Optimization data. The following data will be looked for:

Annotations
@Override