UnivariateOptimizer interface
adding multi-start features to an existing optimizer.
| Modifier and Type | Field and Description |
|---|---|
| private RandomGenerator | generator
Random generator for multi-start. |
| private int | maxEvalIndex
Location in |
| private UnivariatePointValuePair[] | optima
Found optima. |
| private OptimizationData[] | optimData
Optimization data. |
| private final UnivariateOptimizer | optimizer
Underlying classical optimizer. |
| private int | searchIntervalIndex
Location in |
| private int | starts
Number of starts to go. |
| private int | totalEvaluations
Number of evaluations already performed for all starts. |
| Access | Constructor and Description |
|---|---|
| public | MultiStartUnivariateOptimizer(final UnivariateOptimizer
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)Create a multi-start optimizer from a single-start optimizer. |
| Modifier and Type | Method and Description |
|---|---|
| protected UnivariatePointValuePair | doOptimize()
Implements abstract org. Performs the bulk of the optimization algorithm. |
| public int | getEvaluations()
Overrides org. Gets the number of evaluations of the objective function. |
| public UnivariatePointValuePair[] | Returns: an array containing the optima.Gets all the optima found during the last call to |
| public UnivariatePointValuePair | optimize(OptimizationData...
Optimization data. In addition to those documented in
optData)BaseOptimizer, this method will register the following data:
Overrides org. Stores data and performs the optimization. |
| private void |
| generator | back to summary |
|---|---|
| private RandomGenerator generator Random generator for multi-start. | |
| maxEvalIndex | back to summary |
|---|---|
| private int maxEvalIndex Location in | |
| optima | back to summary |
|---|---|
| private UnivariatePointValuePair[] optima Found optima. | |
| optimData | back to summary |
|---|---|
| private OptimizationData[] optimData Optimization data. | |
| optimizer | back to summary |
|---|---|
| private final UnivariateOptimizer optimizer Underlying classical optimizer. | |
| searchIntervalIndex | back to summary |
|---|---|
| private int searchIntervalIndex Location in | |
| 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. | |
| MultiStartUnivariateOptimizer | back to summary |
|---|---|
| public MultiStartUnivariateOptimizer(final UnivariateOptimizer optimizer, final int starts, final RandomGenerator generator) Create a multi-start optimizer from a single-start optimizer.
| |
| doOptimize | back to summary |
|---|---|
| protected UnivariatePointValuePair doOptimize() Implements abstract org. Doc from org. Performs the bulk of the optimization algorithm.
| |
| getEvaluations | back to summary |
|---|---|
| public int getEvaluations() Overrides org. Doc from org. Gets the number of evaluations of the objective function.
The number of evaluations corresponds to the last call to the
| |
| getOptima | back to summary |
|---|---|
| public UnivariatePointValuePair[] getOptima() Gets all the optima found during the last call to
| |
| optimize | back to summary |
|---|---|
| public UnivariatePointValuePair optimize(OptimizationData... optData) Overrides org. Doc from org. Stores data and performs the optimization. The list of parameters is open-ended so that sub-classes can extend it with arguments specific to their concrete implementations. When the method is called multiple times, instance data is overwritten only when actually present in the list of arguments: when not specified, data set in a previous call is retained (and thus is optional in subsequent calls). Important Note Subclasses must override
| |
| sortPairs | back to summary |
|---|---|
| private void sortPairs(final GoalType goal) Sort the optima from best to worst, followed by
| |