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

public abstract Class BaseMultivariateOptimizer<PAIR>

extends BaseOptimizer<PAIR>
Class Inheritance
Known Direct Subclasses
org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer, org.apache.commons.math3.optim.nonlinear.vector.MultivariateVectorOptimizer, org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer
Type Parameters
<PAIR>
Type of the point/value pair returned by the optimization algorithm.
Imports
org.apache.commons.math3.exception.DimensionMismatchException, .NumberIsTooSmallException, .NumberIsTooLargeException

Base class for implementing optimizers for multivariate functions. It contains the boiler-plate code for initial guess and bounds specifications. It is not a "user" class.
Since
3.1

Field Summary

Modifier and TypeField and Description
private double[]
lowerBound

Lower bounds.

private double[]
start

Initial guess.

private double[]
upperBound

Upper bounds.

Inherited from org.apache.commons.math3.optim.BaseOptimizer:
evaluationsiterations

Constructor Summary

AccessConstructor and Description
protected
BaseMultivariateOptimizer(ConvergenceChecker<PAIR>
Convergence checker.
checker
)

Method Summary

Modifier and TypeMethod and Description
private void
checkParameters()

Check parameters consistency.

public double[]

Returns:

the lower bounds, or null if not set.
getLowerBound
()

public double[]

Returns:

the initial guess, or null if not set.
getStartPoint
()

Gets the initial guess.

public double[]

Returns:

the upper bounds, or null if not set.
getUpperBound
()

public PAIR

Returns:

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

Overrides org.apache.commons.math3.optim.BaseOptimizer.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.BaseOptimizer.parseOptimizationData.

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

Inherited from org.apache.commons.math3.optim.BaseOptimizer:
doOptimizegetConvergenceCheckergetEvaluationsgetIterationsgetMaxEvaluationsgetMaxIterationsincrementEvaluationCountincrementIterationCountoptimize

Field Detail

lowerBoundback to summary
private double[] lowerBound

Lower bounds.

startback to summary
private double[] start

Initial guess.

upperBoundback to summary
private double[] upperBound

Upper bounds.

Constructor Detail

BaseMultivariateOptimizerback to summary
protected BaseMultivariateOptimizer(ConvergenceChecker<PAIR> checker)
Parameters
checker:ConvergenceChecker<PAIR>

Convergence checker.

Method Detail

checkParametersback to summary
private void checkParameters()

Check parameters consistency.

getLowerBoundback to summary
public double[] getLowerBound()
Returns:double[]

the lower bounds, or null if not set.

getStartPointback to summary
public double[] getStartPoint()

Gets the initial guess.

Returns:double[]

the initial guess, or null if not set.

getUpperBoundback to summary
public double[] getUpperBound()
Returns:double[]

the upper bounds, or null if not set.

optimizeback to summary
public PAIR optimize(OptimizationData... optData)

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

Doc from org.apache.commons.math3.optim.BaseOptimizer.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 BaseOptimizer, this method will register the following data:

Returns:PAIR

a point/value pair that satisfies the convergence criteria.

Annotations
@Override
parseOptimizationDataback to summary
protected void parseOptimizationData(OptimizationData... optData)

Overrides org.apache.commons.math3.optim.BaseOptimizer.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