public abstract class AbstractSimplex extends Object implements OptimizationData
SimplexOptimizer
.
AbstractSimplex(double[])
or AbstractSimplex(double[][])
.
The other constructor
will set all steps
to 1, thus building a default configuration from a unit hypercube.
build
method in order
to create the data structure that will be acted on by the other methods of
this class.SimplexOptimizer
Modifier and Type | Method and Description |
---|---|
void |
build(double[] startPoint)
Build an initial simplex.
|
void |
evaluate(MultivariateFunction evaluationFunction,
Comparator<PointValuePair> comparator)
Evaluate all the non-evaluated points of the simplex.
|
int |
getDimension()
Get simplex dimension.
|
PointValuePair |
getPoint(int index)
Get the simplex point stored at the requested
index . |
PointValuePair[] |
getPoints()
Get the points of the simplex.
|
int |
getSize()
Get simplex size.
|
abstract void |
iterate(MultivariateFunction evaluationFunction,
Comparator<PointValuePair> comparator)
Compute the next simplex of the algorithm.
|
public int getDimension()
public int getSize()
build
method, this method will
will be equivalent to getDimension() + 1
.public abstract void iterate(MultivariateFunction evaluationFunction, Comparator<PointValuePair> comparator)
evaluationFunction
- Evaluation function.comparator
- Comparator to use to sort simplex vertices from best
to worst.TooManyEvaluationsException
- if the algorithm fails to converge.public void build(double[] startPoint)
startPoint
- First point of the simplex.DimensionMismatchException
- if the start point does not match
simplex dimension.public void evaluate(MultivariateFunction evaluationFunction, Comparator<PointValuePair> comparator)
evaluationFunction
- Evaluation function.comparator
- Comparator to use to sort simplex vertices from best to worst.TooManyEvaluationsException
- if the maximal number of evaluations is exceeded.public PointValuePair[] getPoints()
public PointValuePair getPoint(int index)
index
.index
- Location.index
.Jas4pp 1.5 © Java Analysis Studio for Particle Physics