Class NelderMeadSimplex
java.lang.Object
org.apache.commons.math3.optimization.direct.AbstractSimplex
org.apache.commons.math3.optimization.direct.NelderMeadSimplex
- All Implemented Interfaces:
OptimizationData
Deprecated.
As of 3.1 (to be removed in 4.0).
This class implements the Nelder-Mead simplex algorithm.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double
Deprecated.Default value forgamma
: 0.5.private static final double
Deprecated.Default value forkhi
: 2.0.private static final double
Deprecated.Default value forrho
: 1.0.private static final double
Deprecated.Default value forsigma
: 0.5.private final double
Deprecated.Contraction coefficient.private final double
Deprecated.Expansion coefficient.private final double
Deprecated.Reflection coefficient.private final double
Deprecated.Shrinkage coefficient. -
Constructor Summary
ConstructorsConstructorDescriptionNelderMeadSimplex
(double[] steps) Deprecated.Build a Nelder-Mead simplex with default coefficients.NelderMeadSimplex
(double[][] referenceSimplex) Deprecated.Build a Nelder-Mead simplex with default coefficients.NelderMeadSimplex
(double[][] referenceSimplex, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients.NelderMeadSimplex
(double[] steps, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients.NelderMeadSimplex
(int n) Deprecated.Build a Nelder-Mead simplex with default coefficients.NelderMeadSimplex
(int n, double sideLength) Deprecated.Build a Nelder-Mead simplex with default coefficients.NelderMeadSimplex
(int n, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients.NelderMeadSimplex
(int n, double sideLength, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients. -
Method Summary
Modifier and TypeMethodDescriptionvoid
iterate
(MultivariateFunction evaluationFunction, 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
-
Field Details
-
DEFAULT_RHO
private static final double DEFAULT_RHODeprecated.Default value forrho
: 1.0.- See Also:
-
DEFAULT_KHI
private static final double DEFAULT_KHIDeprecated.Default value forkhi
: 2.0.- See Also:
-
DEFAULT_GAMMA
private static final double DEFAULT_GAMMADeprecated.Default value forgamma
: 0.5.- See Also:
-
DEFAULT_SIGMA
private static final double DEFAULT_SIGMADeprecated.Default value forsigma
: 0.5.- See Also:
-
rho
private final double rhoDeprecated.Reflection coefficient. -
khi
private final double khiDeprecated.Expansion coefficient. -
gamma
private final double gammaDeprecated.Contraction coefficient. -
sigma
private final double sigmaDeprecated.Shrinkage coefficient.
-
-
Constructor Details
-
NelderMeadSimplex
public NelderMeadSimplex(int n) Deprecated.Build a Nelder-Mead simplex with default coefficients. The default coefficients are 1.0 for rho, 2.0 for khi and 0.5 for both gamma and sigma.- Parameters:
n
- Dimension of the simplex.
-
NelderMeadSimplex
public NelderMeadSimplex(int n, double sideLength) Deprecated.Build a Nelder-Mead simplex with default coefficients. The default coefficients are 1.0 for rho, 2.0 for khi and 0.5 for both gamma and sigma.- Parameters:
n
- Dimension of the simplex.sideLength
- Length of the sides of the default (hypercube) simplex. SeeAbstractSimplex(int,double)
.
-
NelderMeadSimplex
public NelderMeadSimplex(int n, double sideLength, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients.- Parameters:
n
- Dimension of the simplex. SeeAbstractSimplex(int,double)
.sideLength
- Length of the sides of the default (hypercube) simplex. SeeAbstractSimplex(int,double)
.rho
- Reflection coefficient.khi
- Expansion coefficient.gamma
- Contraction coefficient.sigma
- Shrinkage coefficient.
-
NelderMeadSimplex
public NelderMeadSimplex(int n, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients.- Parameters:
n
- Dimension of the simplex. SeeAbstractSimplex(int)
.rho
- Reflection coefficient.khi
- Expansion coefficient.gamma
- Contraction coefficient.sigma
- Shrinkage coefficient.
-
NelderMeadSimplex
public NelderMeadSimplex(double[] steps) Deprecated.Build a Nelder-Mead simplex with default coefficients. The default coefficients are 1.0 for rho, 2.0 for khi and 0.5 for both gamma and sigma.- Parameters:
steps
- Steps along the canonical axes representing box edges. They may be negative but not zero. See
-
NelderMeadSimplex
public NelderMeadSimplex(double[] steps, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients.- Parameters:
steps
- Steps along the canonical axes representing box edges. They may be negative but not zero. SeeAbstractSimplex(double[])
.rho
- Reflection coefficient.khi
- Expansion coefficient.gamma
- Contraction coefficient.sigma
- Shrinkage coefficient.- Throws:
IllegalArgumentException
- if one of the steps is zero.
-
NelderMeadSimplex
public NelderMeadSimplex(double[][] referenceSimplex) Deprecated.Build a Nelder-Mead simplex with default coefficients. The default coefficients are 1.0 for rho, 2.0 for khi and 0.5 for both gamma and sigma.- Parameters:
referenceSimplex
- Reference simplex. SeeAbstractSimplex(double[][])
.
-
NelderMeadSimplex
public NelderMeadSimplex(double[][] referenceSimplex, double rho, double khi, double gamma, double sigma) Deprecated.Build a Nelder-Mead simplex with specified coefficients.- Parameters:
referenceSimplex
- Reference simplex. SeeAbstractSimplex(double[][])
.rho
- Reflection coefficient.khi
- Expansion coefficient.gamma
- Contraction coefficient.sigma
- Shrinkage 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 Details
-
iterate
Deprecated.Compute the next simplex of the algorithm.- Specified by:
iterate
in classAbstractSimplex
- Parameters:
evaluationFunction
- Evaluation function.comparator
- Comparator to use to sort simplex vertices from best to worst.
-