org.apache.commons.math3.optimization.direct

## Class MultiDirectionalSimplex

- java.lang.Object
- - org.apache.commons.math3.optimization.direct.AbstractSimplex
  - - org.apache.commons.math3.optimization.direct.MultiDirectionalSimplex

All Implemented Interfaces:
  OptimizationData

Deprecated.
As of 3.1 (to be removed in 4.0).

    @Deprecated
    public class MultiDirectionalSimplex
    extends AbstractSimplex

This class implements the multi-directional direct search method.

Since:
  3.0
Version:
  $Id: MultiDirectionalSimplex.java 1422230 2012-12-15 12:11:13Z erans $

### Field Summary

Fields
`private static double` `DEFAULT_GAMMA` Deprecated. Default value for `gamma`: 0.5.
`private static double` `DEFAULT_KHI` Deprecated. Default value for `khi`: 2.0.
`private double` `gamma` Deprecated. Contraction coefficient.
`private double` `khi` Deprecated. Expansion coefficient.

### Constructor Summary

Constructors
Constructor and Description
`MultiDirectionalSimplex(double[] steps)` Deprecated. Build a multi-directional simplex with default coefficients.
`MultiDirectionalSimplex(double[][] referenceSimplex)` Deprecated. Build a multi-directional simplex with default coefficients.
`MultiDirectionalSimplex(double[][] referenceSimplex, double khi, double gamma)` Deprecated. Build a multi-directional simplex with specified coefficients.
`MultiDirectionalSimplex(double[] steps, double khi, double gamma)` Deprecated. Build a multi-directional simplex with specified coefficients.
`MultiDirectionalSimplex(int n)` Deprecated. Build a multi-directional simplex with default coefficients.
`MultiDirectionalSimplex(int n, double sideLength)` Deprecated. Build a multi-directional simplex with default coefficients.
`MultiDirectionalSimplex(int n, double khi, double gamma)` Deprecated. Build a multi-directional simplex with specified coefficients.
`MultiDirectionalSimplex(int n, double sideLength, double khi, double gamma)` Deprecated. Build a multi-directional simplex with specified coefficients.

### Method Summary

Methods
`private PointValuePair` `evaluateNewSimplex(MultivariateFunction evaluationFunction, PointValuePair[] original, double coeff, java.util.Comparator<PointValuePair> comparator)` Deprecated. Compute and evaluate a new simplex.
`void` `iterate(MultivariateFunction evaluationFunction, java.util.Comparator<PointValuePair> comparator)` Deprecated. Compute the next simplex of the algorithm.

### Methods inherited from class org.apache.commons.math3.optimization.direct.AbstractSimplex

`build, evaluate, getDimension, getPoint, getPoints, getSize, replaceWorstPoint, setPoint, setPoints`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_KHI

    private static final double DEFAULT_KHI

Deprecated.
Default value for `khi`: 2.0.

See Also:
  Constant Field Values

#### DEFAULT_GAMMA

    private static final double DEFAULT_GAMMA

Deprecated.
Default value for `gamma`: 0.5.

See Also:
  Constant Field Values

#### khi

    private final double khi

Deprecated.
Expansion coefficient.

#### gamma

    private final double gamma

Deprecated.
Contraction coefficient.

### Constructor Detail

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(int n)

Deprecated.
Build a multi-directional simplex with default coefficients. The default values are 2.0 for khi and 0.5 for gamma.

Parameters:
  `n` - Dimension of the simplex.

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(int n,
                           double sideLength)

Deprecated.
Build a multi-directional simplex with default coefficients. The default values are 2.0 for khi and 0.5 for gamma.

Parameters:
  `n` - Dimension of the simplex.
  `sideLength` - Length of the sides of the default (hypercube) simplex. See `AbstractSimplex.AbstractSimplex(int,double)`.

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(int n,
                           double khi,
                           double gamma)

Deprecated.
Build a multi-directional simplex with specified coefficients.

Parameters:
  `n` - Dimension of the simplex. See `AbstractSimplex.AbstractSimplex(int,double)`.
  `khi` - Expansion coefficient.
  `gamma` - Contraction coefficient.

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(int n,
                           double sideLength,
                           double khi,
                           double gamma)

Deprecated.
Build a multi-directional simplex with specified coefficients.

Parameters:
  `n` - Dimension of the simplex. See `AbstractSimplex.AbstractSimplex(int,double)`.
  `sideLength` - Length of the sides of the default (hypercube) simplex. See `AbstractSimplex.AbstractSimplex(int,double)`.
  `khi` - Expansion coefficient.
  `gamma` - Contraction coefficient.

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(double[] steps)

Deprecated.
Build a multi-directional simplex with default coefficients. The default values are 2.0 for khi and 0.5 for gamma.

Parameters:
  `steps` - Steps along the canonical axes representing box edges. They may be negative but not zero. See

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(double[] steps,
                           double khi,
                           double gamma)

Deprecated.
Build a multi-directional simplex with specified coefficients.

Parameters:
  `steps` - Steps along the canonical axes representing box edges. They may be negative but not zero. See `AbstractSimplex.AbstractSimplex(double[])`.
  `khi` - Expansion coefficient.
  `gamma` - Contraction coefficient.

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(double[][] referenceSimplex)

Deprecated.
Build a multi-directional simplex with default coefficients. The default values are 2.0 for khi and 0.5 for gamma.

Parameters:
  `referenceSimplex` - Reference simplex. See `AbstractSimplex.AbstractSimplex(double[][])`.

#### MultiDirectionalSimplex

    public MultiDirectionalSimplex(double[][] referenceSimplex,
                           double khi,
                           double gamma)

Deprecated.
Build a multi-directional simplex with specified coefficients.

Parameters:
  `referenceSimplex` - Reference simplex. See `AbstractSimplex.AbstractSimplex(double[][])`.
  `khi` - Expansion coefficient.
  `gamma` - Contraction coefficient.
Throws:
  `NotStrictlyPositiveException` - if the reference simplex does not contain at least one point.
  `DimensionMismatchException` - if there is a dimension mismatch in the reference simplex.

### Method Detail

#### iterate

    public void iterate(MultivariateFunction evaluationFunction,
               java.util.Comparator<PointValuePair> comparator)

Deprecated.
Compute the next simplex of the algorithm.

Specified by:
  `iterate` in class `AbstractSimplex`
Parameters:
  `evaluationFunction` - Evaluation function.
  `comparator` - Comparator to use to sort simplex vertices from best to worst.

#### evaluateNewSimplex

    private PointValuePair evaluateNewSimplex(MultivariateFunction evaluationFunction,
                                    PointValuePair[] original,
                                    double coeff,
                                    java.util.Comparator<PointValuePair> comparator)

Deprecated.
Compute and evaluate a new simplex.

Parameters:
  `evaluationFunction` - Evaluation function.
  `original` - Original simplex (to be preserved).
  `coeff` - Linear coefficient.
  `comparator` - Comparator to use to sort simplex vertices from best to poorest.
Returns:
  the best point in the transformed simplex.
Throws:
  `TooManyEvaluationsException` - if the maximal number of evaluations is exceeded.