Class MultiDirectionalSimplex
- java.lang.Object
-
- org.hipparchus.optim.nonlinear.scalar.noderiv.AbstractSimplex
-
- org.hipparchus.optim.nonlinear.scalar.noderiv.MultiDirectionalSimplex
-
- All Implemented Interfaces:
OptimizationData
public class MultiDirectionalSimplex extends AbstractSimplex
This class implements the multi-directional direct search method.
-
-
Constructor Summary
Constructors Constructor Description MultiDirectionalSimplex(double[] steps)
Build a multi-directional simplex with default coefficients.MultiDirectionalSimplex(double[][] referenceSimplex)
Build a multi-directional simplex with default coefficients.MultiDirectionalSimplex(double[][] referenceSimplex, double khi, double gamma)
Build a multi-directional simplex with specified coefficients.MultiDirectionalSimplex(double[] steps, double khi, double gamma)
Build a multi-directional simplex with specified coefficients.MultiDirectionalSimplex(int n)
Build a multi-directional simplex with default coefficients.MultiDirectionalSimplex(int n, double sideLength)
Build a multi-directional simplex with default coefficients.MultiDirectionalSimplex(int n, double khi, double gamma)
Build a multi-directional simplex with specified coefficients.MultiDirectionalSimplex(int n, double sideLength, double khi, double gamma)
Build a multi-directional simplex with specified coefficients.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
iterate(MultivariateFunction evaluationFunction, Comparator<PointValuePair> comparator)
Compute the next simplex of the algorithm.-
Methods inherited from class org.hipparchus.optim.nonlinear.scalar.noderiv.AbstractSimplex
build, evaluate, getDimension, getPoint, getPoints, getSize, replaceWorstPoint, setPoint, setPoints
-
-
-
-
Constructor Detail
-
MultiDirectionalSimplex
public MultiDirectionalSimplex(int n)
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)
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. SeeAbstractSimplex(int,double)
.
-
MultiDirectionalSimplex
public MultiDirectionalSimplex(int n, double khi, double gamma)
Build a multi-directional simplex with specified coefficients.- Parameters:
n
- Dimension of the simplex. SeeAbstractSimplex(int,double)
.khi
- Expansion coefficient.gamma
- Contraction coefficient.
-
MultiDirectionalSimplex
public MultiDirectionalSimplex(int n, double sideLength, double khi, double gamma)
Build a multi-directional 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)
.khi
- Expansion coefficient.gamma
- Contraction coefficient.
-
MultiDirectionalSimplex
public MultiDirectionalSimplex(double[] steps)
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)
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. SeeAbstractSimplex(double[])
.khi
- Expansion coefficient.gamma
- Contraction coefficient.
-
MultiDirectionalSimplex
public MultiDirectionalSimplex(double[][] referenceSimplex)
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. SeeAbstractSimplex(double[][])
.
-
MultiDirectionalSimplex
public MultiDirectionalSimplex(double[][] referenceSimplex, double khi, double gamma)
Build a multi-directional simplex with specified coefficients.- Parameters:
referenceSimplex
- Reference simplex. SeeAbstractSimplex(double[][])
.khi
- Expansion coefficient.gamma
- Contraction coefficient.- Throws:
MathIllegalArgumentException
- if the reference simplex does not contain at least one point.MathIllegalArgumentException
- if there is a dimension mismatch in the reference simplex.
-
-
Method Detail
-
iterate
public void iterate(MultivariateFunction evaluationFunction, Comparator<PointValuePair> comparator)
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.
-
-