Package org.apache.commons.math3.optimization.general

# 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 inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer

`evaluations`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractScalarDifferentiableOptimizer()`
Deprecated.
See `SimpleValueChecker()`
`protected`
`AbstractScalarDifferentiableOptimizer(ConvergenceChecker<PointValuePair> checker)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`protected double[]`
`computeObjectiveGradient(double[] evaluationPoint)`
Deprecated.
Compute the gradient vector.
`PointValuePair`
`optimize(int maxEval, MultivariateDifferentiableFunction f, GoalType goalType, double[] startPoint)`
Deprecated.
Optimize an objective function.
`protected PointValuePair`
`optimizeInternal(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`

## Constructor Details

### AbstractScalarDifferentiableOptimizer

@Deprecated protected AbstractScalarDifferentiableOptimizer()
Deprecated.
See `SimpleValueChecker()`
Simple constructor with default settings. The convergence check is set to a `SimpleValueChecker`.

### AbstractScalarDifferentiableOptimizer

protected AbstractScalarDifferentiableOptimizer(ConvergenceChecker<PointValuePair> checker)
Deprecated.

Parameters:
  `checker` - Convergence checker.

## Method Details

### 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:
  `optimizeInternal` in class `BaseAbstractMultivariateOptimizer<DifferentiableMultivariateFunction>`
Parameters:
  `maxEval` - Maximum number of function evaluations.
  `f` - Objective function.
  `goalType` - Type of optimization goal: either `GoalType.MAXIMIZE` or `GoalType.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:
  `maxEval` - Maximum number of function evaluations.
  `f` - Objective function.
  `goalType` - Type of optimization goal: either `GoalType.MAXIMIZE` or `GoalType.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 is `null`.