Deprecated
As of 3.1 (to be removed in 4.0).
UnivariateOptimizer interface
adding multi-start features to an existing optimizer.
This class wraps a classical optimizer to use it several times in
turn with different starting points in order to avoid being trapped
into a local extremum when looking for a global one.
| Modifier and Type | Field and Description |
|---|---|
| private RandomGenerator | generator
Random generator for multi-start. |
| private int | maxEvaluations
Maximal number of evaluations allowed. |
| private UnivariatePointValuePair[] | optima
Deprecated
as a consequence of Found optima.
UnivariatePointValuePair being deprecated.
|
| private final BaseUnivariateOptimizer | optimizer
Deprecated
as a consequence of Underlying classical optimizer.
BaseUnivariateOptimizer being deprecated.
|
| private int | starts
Number of starts to go. |
| private int | totalEvaluations
Number of evaluations already performed for all starts. |
| Access | Constructor and Description |
|---|---|
| public | UnivariateMultiStartOptimizer(final BaseUnivariateOptimizer<FUNC>
Single-start optimizer to wrap. optimizer, final int Number of starts to perform. If starts, final RandomGenerator starts == 1,
the optimize methods will return the same solution as
optimizer would.Random generator to use for restarts. generator)
Deprecated
as a consequence of
BaseUnivariateOptimizer being deprecated.
Create a multi-start optimizer from a single-start optimizer. |
| Modifier and Type | Method and Description |
|---|---|
| public ConvergenceChecker | getConvergenceChecker()
Implements org.
Deprecated
as a consequence of
ConvergenceChecker being deprecated.
Get the convergence checker. |
| public int | getEvaluations()
Implements org. Get the number of evaluations of the objective function. |
| public int | getMaxEvaluations()
Implements org. Get the maximal number of function evaluations. |
| public UnivariatePointValuePair[] | Returns: an array containing the optima.
Deprecated
as a consequence of
UnivariatePointValuePair being deprecated.
Get all the optima found during the last call to |
| public UnivariatePointValuePair | optimize(int
Maximum number of function evaluations. maxEval, final FUNC Function to optimize. f, final GoalType Type of optimization goal: either
goal, final double GoalType#MAXIMIZE or GoalType#MINIMIZE.Lower bound for the interval. min, final double Upper bound for the interval. max)Implements org.
Deprecated
as a consequence of
GoalType and UnivariatePointValuePair being deprecated.
Find an optimum in the given interval. |
| public UnivariatePointValuePair | optimize(int
Maximum number of function evaluations. maxEval, final FUNC Function to optimize. f, final GoalType Type of optimization goal: either
goal, final double GoalType#MAXIMIZE or GoalType#MINIMIZE.Lower bound for the interval. min, final double Upper bound for the interval. max, final double Start value to use. startValue)Implements org.
Deprecated
as a consequence of
GoalType and UnivariatePointValuePair being deprecated.
Find an optimum in the given interval, start at startValue. |
| private void |
| generator | back to summary |
|---|---|
| private RandomGenerator generator Random generator for multi-start. | |
| maxEvaluations | back to summary |
|---|---|
| private int maxEvaluations Maximal number of evaluations allowed. | |
| optima | back to summary |
|---|---|
| private UnivariatePointValuePair[] optima
Deprecated as a consequence of Found optima. | |
| optimizer | back to summary |
|---|---|
| private final BaseUnivariateOptimizer<FUNC> optimizer
Deprecated as a consequence of Underlying classical optimizer. | |
| starts | back to summary |
|---|---|
| private int starts Number of starts to go. | |
| totalEvaluations | back to summary |
|---|---|
| private int totalEvaluations Number of evaluations already performed for all starts. | |
| UnivariateMultiStartOptimizer | back to summary |
|---|---|
| public UnivariateMultiStartOptimizer(final BaseUnivariateOptimizer<FUNC> optimizer, final int starts, final RandomGenerator generator)
Deprecated as a consequence of Create a multi-start optimizer from a single-start optimizer.
| |
| getConvergenceChecker | back to summary |
|---|---|
| public ConvergenceChecker Implements org. Doc from org. Deprecated as a consequence of Get the convergence checker.
| |
| getEvaluations | back to summary |
|---|---|
| public int getEvaluations() Implements org. Doc from org. Get the number of evaluations of the objective function.
The number of evaluations corresponds to the last call to the
| |
| getMaxEvaluations | back to summary |
|---|---|
| public int getMaxEvaluations() Implements org. Doc from org. Get the maximal number of function evaluations.
| |
| getOptima | back to summary |
|---|---|
| public UnivariatePointValuePair[] getOptima()
Deprecated as a consequence of Get all the optima found during the last call to
| |
| optimize | back to summary |
|---|---|
| public UnivariatePointValuePair optimize(int maxEval, final FUNC f, final GoalType goal, final double min, final double max) Implements org. Doc from org. Deprecated as a consequence of Find an optimum in the given interval. An optimizer may require that the interval brackets a single optimum.
| |
| optimize | back to summary |
|---|---|
| public UnivariatePointValuePair optimize(int maxEval, final FUNC f, final GoalType goal, final double min, final double max, final double startValue) Implements org. Doc from org. Deprecated as a consequence of Find an optimum in the given interval, start at startValue. An optimizer may require that the interval brackets a single optimum.
| |
| sortPairs | back to summary |
|---|---|
| private void sortPairs(final GoalType goal)
Deprecated as a consequence of Sort the optima from best to worst, followed by
| |