org.apache.commons.math.optimization

## Interface MultivariateRealOptimizer

All Known Implementing Classes:
  DirectSearchOptimizer, MultiDirectional, MultiStartMultivariateRealOptimizer, NelderMead

    public interface MultivariateRealOptimizer

This interface represents an optimization algorithm for `scalar objective functions`.

Optimization algorithms find the input point set that either `maximize or minimize` an objective function.

Since:
  2.0
Version:
  $Revision: 1065481 $ $Date: 2011-01-31 06:31:41 +0100 (lun. 31 janv. 2011) $
See Also:
  `DifferentiableMultivariateRealOptimizer`, `DifferentiableMultivariateVectorialOptimizer`

### Method Summary

Methods
`RealConvergenceChecker` `getConvergenceChecker()` Get the convergence checker.
`int` `getEvaluations()` Get the number of evaluations of the objective function.
`int` `getIterations()` Get the number of iterations realized by the algorithm.
`int` `getMaxEvaluations()` Get the maximal number of functions evaluations.
`int` `getMaxIterations()` Get the maximal number of iterations of the algorithm.
`RealPointValuePair` `optimize(MultivariateRealFunction f, GoalType goalType, double[] startPoint)` Optimizes an objective function.
`void` `setConvergenceChecker(RealConvergenceChecker checker)` Set the convergence checker.
`void` `setMaxEvaluations(int maxEvaluations)` Set the maximal number of functions evaluations.
`void` `setMaxIterations(int maxIterations)` Set the maximal number of iterations of the algorithm.

### Method Detail

#### setMaxIterations

    void setMaxIterations(int maxIterations)

Set the maximal number of iterations of the algorithm.

Parameters:
  `maxIterations` - maximal number of algorithm iterations

#### getMaxIterations

    int getMaxIterations()

Get the maximal number of iterations of the algorithm.

Returns:
  maximal number of iterations

#### setMaxEvaluations

    void setMaxEvaluations(int maxEvaluations)

Set the maximal number of functions evaluations.

Parameters:
  `maxEvaluations` - maximal number of function evaluations

#### getMaxEvaluations

    int getMaxEvaluations()

Get the maximal number of functions evaluations.

Returns:
  maximal number of functions evaluations

#### getIterations

    int getIterations()

Get the number of iterations realized by the algorithm.

The number of evaluations corresponds to the last call to the `optimize` method. It is 0 if the method has not been called yet.

Returns:
  number of iterations

#### getEvaluations

    int getEvaluations()

Get the number of evaluations of the objective function.

The number of evaluations corresponds to the last call to the `optimize` method. It is 0 if the method has not been called yet.

Returns:
  number of evaluations of the objective function

#### setConvergenceChecker

    void setConvergenceChecker(RealConvergenceChecker checker)

Set the convergence checker.

Parameters:
  `checker` - object to use to check for convergence

#### getConvergenceChecker

    RealConvergenceChecker getConvergenceChecker()

Get the convergence checker.

Returns:
  object used to check for convergence

#### optimize

    RealPointValuePair optimize(MultivariateRealFunction f,
                              GoalType goalType,
                              double[] startPoint)
                                throws FunctionEvaluationException,
                                       OptimizationException,
                                       IllegalArgumentException

Optimizes an objective function.

Parameters:
  `f` - objective function
  `goalType` - type of optimization goal: either `GoalType.MAXIMIZE` or `GoalType.MINIMIZE`
  `startPoint` - the start point for optimization
Returns:
  the point/value pair giving the optimal value for objective function
Throws:
  `FunctionEvaluationException` - if the objective function throws one during the search
  `OptimizationException` - if the algorithm failed to converge
  `IllegalArgumentException` - if the start point dimension is wrong