public interface TerminationCondition extends Cloneable, InstantiableFromParameterSet, Storable
doNextIteration(int, double, double, double[], double[], double, Time)
which method returns false
if no further iteration of the algorithm should be computed and the algorithm should be stopped.
If the method returns true
another iteration in the algorithm should be done.Optimizer
Modifier and Type | Method and Description |
---|---|
boolean |
doNextIteration(int iteration,
double f_last,
double f_current,
double[] gradient,
double[] direction,
double alpha,
Time t)
This method allows to decide whether to do another iteration in an optimization or not.
|
boolean |
isSimple()
This method returns
false if the TerminationCondition uses either
the gradient or the direction for the decision, otherwise it returns true . |
getCurrentParameterSet
boolean doNextIteration(int iteration, double f_last, double f_current, double[] gradient, double[] direction, double alpha, Time t)
true
it is recommended to do another iteration, otherwise
(the method returns false
and) it is recommended to stop the algorithm.iteration
- the number of performed iterationsf_last
- last value of the functionf_current
- current value of the functiongradient
- the gradient of the functiondirection
- the last direction of the optimizationalpha
- the last step sizet
- a time object measuring the time that has been elapsed in the optimizationtrue
if another iteration should be doneboolean isSimple()
false
if the TerminationCondition
uses either
the gradient or the direction for the decision, otherwise it returns true
.false
for gradient or direction based TerminationCondition
s