T
- Type of the point/value pair returned by the optimization
algorithm.public abstract class BaseMultiStartMultivariateOptimizer<T> extends BaseMultivariateOptimizer<T>
evaluations, iterations
Constructor and Description |
---|
BaseMultiStartMultivariateOptimizer(BaseMultivariateOptimizer<T> optimizerIn,
int startsIn,
RandomVectorGenerator generatorIn)
Create a multi-start optimizer from a single-start optimizer.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
clear()
Method that will called in order to clear all stored optima.
|
protected T |
doOptimize()
Performs the bulk of the optimization algorithm.
|
int |
getEvaluations()
Gets the number of evaluations of the objective function.
|
abstract T[] |
getOptima()
Gets all the optima found during the last call to
optimize . |
T |
optimize(OptimizationData... optData)
Stores data and performs the optimization.
|
protected abstract void |
store(T optimum)
Method that will be called in order to store each found optimum.
|
getLowerBound, getStartPoint, getUpperBound
getConvergenceChecker, getIterations, getMaxEvaluations, getMaxIterations, incrementEvaluationCount, incrementIterationCount
public BaseMultiStartMultivariateOptimizer(BaseMultivariateOptimizer<T> optimizerIn, int startsIn, RandomVectorGenerator generatorIn)
optimizerIn
- Single-start optimizer to wrap.startsIn
- Number of starts to perform. If starts == 1
,
the optimize
will return the
same solution as the given optimizer
would return.generatorIn
- Random vector generator to use for restarts.NotStrictlyPositiveException
- if starts < 1
.public int getEvaluations()
optimize
method. It is 0 if the method has
not been
called yet.getEvaluations
in class BaseOptimizer<T>
public abstract T[] getOptima()
optimize
.
The optimizer stores all the optima found during a set of
restarts. The optimize
method returns the best point only.
This method returns all the points found at the end of each starts,
including the best one already returned by the optimize
method. null
elements
corresponding to the runs that did not converge. This means all
elements will be null
if the optimize
method did throw
an exception.
This also means that if the first element is not null
, it is
the best point found across all starts. optimize
; it will likely throw
NullPointerException
.public T optimize(OptimizationData... optData)
optimize
in class BaseMultivariateOptimizer<T>
optData
- Optimization data.
The following data will be looked for:
MathIllegalStateException
- if optData
does not contain an
instance of MaxEval
or InitialGuess
.protected T doOptimize()
doOptimize
in class BaseOptimizer<T>
protected abstract void store(T optimum)
optimum
- Result of an optimization run.protected abstract void clear()
Copyright © 2019 CNES. All Rights Reserved.