PAIR
- Type of the point/value pair returned by the optimization algorithm.public abstract class AbstractOptimizationProblem<PAIR> extends java.lang.Object implements OptimizationProblem<PAIR>
Modifier and Type | Class and Description |
---|---|
private static class |
AbstractOptimizationProblem.MaxEvalCallback
Defines the action to perform when reaching the maximum number of evaluations.
|
private static class |
AbstractOptimizationProblem.MaxIterCallback
Defines the action to perform when reaching the maximum number of evaluations.
|
Modifier and Type | Field and Description |
---|---|
private ConvergenceChecker<PAIR> |
checker
Convergence checker.
|
private static AbstractOptimizationProblem.MaxEvalCallback |
MAX_EVAL_CALLBACK
Callback to use for the evaluation counter.
|
private static AbstractOptimizationProblem.MaxIterCallback |
MAX_ITER_CALLBACK
Callback to use for the iteration counter.
|
private int |
maxEvaluations
max evaluations
|
private int |
maxIterations
max iterations
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractOptimizationProblem(int maxEvaluations,
int maxIterations,
ConvergenceChecker<PAIR> checker)
Create an
AbstractOptimizationProblem from the given data. |
Modifier and Type | Method and Description |
---|---|
ConvergenceChecker<PAIR> |
getConvergenceChecker()
Gets the convergence checker.
|
Incrementor |
getEvaluationCounter()
Get a independent Incrementor that counts up to the maximum number of evaluations
and then throws an exception.
|
Incrementor |
getIterationCounter()
Get a independent Incrementor that counts up to the maximum number of iterations
and then throws an exception.
|
private static final AbstractOptimizationProblem.MaxEvalCallback MAX_EVAL_CALLBACK
private static final AbstractOptimizationProblem.MaxIterCallback MAX_ITER_CALLBACK
private final int maxEvaluations
private final int maxIterations
private final ConvergenceChecker<PAIR> checker
protected AbstractOptimizationProblem(int maxEvaluations, int maxIterations, ConvergenceChecker<PAIR> checker)
AbstractOptimizationProblem
from the given data.maxEvaluations
- the number of allowed model function evaluations.maxIterations
- the number of allowed iterations.checker
- the convergence checker.public Incrementor getEvaluationCounter()
getEvaluationCounter
in interface OptimizationProblem<PAIR>
public Incrementor getIterationCounter()
getIterationCounter
in interface OptimizationProblem<PAIR>
public ConvergenceChecker<PAIR> getConvergenceChecker()
getConvergenceChecker
in interface OptimizationProblem<PAIR>
Copyright (c) 2003-2016 Apache Software Foundation