## org.apache.commons.math.optimization.direct
Class NelderMead

    java.lang.Object
      org.apache.commons.math.optimization.direct.DirectSearchOptimizer
          org.apache.commons.math.optimization.direct.NelderMead

All Implemented Interfaces:
  MultivariateRealOptimizer

    public class NelderMead

extends DirectSearchOptimizer

This class implements the Nelder-Mead direct search method.

Since:
  1.2
Version:
  $Revision: 811685 $ $Date: 2009-09-05 13:36:48 -0400 (Sat, 05 Sep 2009) $
See Also:
  `MultiDirectional`

Field Summary
`private double` `gamma` Contraction coefficient.
`private double` `khi` Expansion coefficient.
`private double` `rho` Reflection coefficient.
`private double` `sigma` Shrinkage coefficient.

Fields inherited from class org.apache.commons.math.optimization.direct.DirectSearchOptimizer
`simplex`

Constructor Summary
`NelderMead()` Build a Nelder-Mead optimizer with default coefficients.
`NelderMead(double rho, double khi, double gamma, double sigma)` Build a Nelder-Mead optimizer with specified coefficients.

Method Summary
`protected void` `iterateSimplex(java.util.Comparator<RealPointValuePair> comparator)` Compute the next simplex of the algorithm.

Methods inherited from class org.apache.commons.math.optimization.direct.DirectSearchOptimizer
`evaluate, evaluateSimplex, getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementIterationsCounter, optimize, replaceWorstPoint, setConvergenceChecker, setMaxEvaluations, setMaxIterations, setStartConfiguration, setStartConfiguration`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### rho

    private final double rho

  Reflection coefficient.

### khi

    private final double khi

  Expansion coefficient.

### gamma

    private final double gamma

  Contraction coefficient.

### sigma

    private final double sigma

  Shrinkage coefficient.

Constructor Detail

### NelderMead

    public NelderMead()

  Build a Nelder-Mead optimizer with default coefficients.

  The default coefficients are 1.0 for rho, 2.0 for khi and 0.5 for both gamma and sigma.

### NelderMead

    public NelderMead(double rho,
                      double khi,
                      double gamma,
                      double sigma)

  Build a Nelder-Mead optimizer with specified coefficients.

  Parameters:
    `rho` - reflection coefficient
    `khi` - expansion coefficient
    `gamma` - contraction coefficient
    `sigma` - shrinkage coefficient

Method Detail

### iterateSimplex

    protected void iterateSimplex(java.util.Comparator<RealPointValuePair> comparator)
                           throws FunctionEvaluationException,
                                  OptimizationException

  Compute the next simplex of the algorithm.

  Specified by:
    `iterateSimplex` in class `DirectSearchOptimizer`
  Parameters:
    `comparator` - comparator to use to sort simplex vertices from best to worst
  Throws:
    `FunctionEvaluationException` - if the function cannot be evaluated at some point
    `OptimizationException` - if the algorithm fails to converge

Copyright (c) 2003-2011 Apache Software Foundation