AbstractScalarDifferentiableOptimizer (Apache Commons Math 3.3 API)

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.
  As of 3.1 (to be removed in 4.0).

      @Deprecated
      public abstract class AbstractScalarDifferentiableOptimizer
      extends BaseAbstractMultivariateOptimizer<DifferentiableMultivariateFunction>
      implements DifferentiableMultivariateOptimizer

  Base class for implementing optimizers for multivariate scalar differentiable functions. It contains boiler-plate code for dealing with gradient evaluation.
  Since:
    2.0
  Version:
    $Id: AbstractScalarDifferentiableOptimizer.java 1422230 2012-12-15 12:11:13Z erans $

- - ### Field Summary

    - ### Fields inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer

      `evaluations`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 Detail

    - #### AbstractScalarDifferentiableOptimizer

          @Deprecated
          protected AbstractScalarDifferentiableOptimizer()

      Deprecated. See `SimpleValueChecker.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 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:
        `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:
        `f` - Objective function.
        `goalType` - Type of optimization goal: either `GoalType.MAXIMIZE` or `GoalType.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 is `null`.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.