T
- Type of the point/value pair returned by the optimization
algorithm.public abstract class BaseOptimizer<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected Incrementor |
evaluations
Evaluations counter.
|
protected Incrementor |
iterations
Iterations counter.
|
Modifier | Constructor and Description |
---|---|
protected |
BaseOptimizer(ConvergenceChecker<T> checkerIn) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
doOptimize()
Performs the bulk of the optimization algorithm.
|
ConvergenceChecker<T> |
getConvergenceChecker()
Gets the convergence checker.
|
int |
getEvaluations()
Gets the number of evaluations of the objective function.
|
int |
getIterations()
Gets the number of iterations performed by the algorithm.
|
int |
getMaxEvaluations()
Gets the maximal number of function evaluations.
|
int |
getMaxIterations()
Gets the maximal number of iterations.
|
protected void |
incrementEvaluationCount()
Increment the evaluation count.
|
protected void |
incrementIterationCount()
Increment the iteration count.
|
T |
optimize(OptimizationData... optData)
Stores data and performs the optimization.
|
protected final Incrementor evaluations
protected final Incrementor iterations
protected BaseOptimizer(ConvergenceChecker<T> checkerIn)
checkerIn
- Convergence checker.public int getMaxEvaluations()
public int getEvaluations()
optimize
method. It is 0 if the method has
not been
called yet.public int getMaxIterations()
public int getIterations()
optimize
method. It is 0 if the method has not
been
called yet.public ConvergenceChecker<T> getConvergenceChecker()
public T optimize(OptimizationData... optData)
optData
- Optimization data. The following data will be looked for:
TooManyEvaluationsException
- if the maximal number of
evaluations is exceeded.TooManyIterationsException
- if the maximal number of
iterations is exceeded.protected abstract T doOptimize()
protected void incrementEvaluationCount()
TooManyEvaluationsException
- if the allowed evaluations
have been exhausted.protected void incrementIterationCount()
TooManyIterationsException
- if the allowed iterations
have been exhausted.Copyright © 2019 CNES. All rights reserved.