de.jstacs.algorithms.optimization.termination
Interface TerminationCondition
- All Superinterfaces:
- Cloneable, InstantiableFromParameterSet, Storable
- All Known Implementing Classes:
- AbsoluteValueCondition, AbstractTerminationCondition, CombinedCondition, IterationCondition, SmallDifferenceOfFunctionEvaluationsCondition, SmallGradientConditon, SmallStepCondition, TimeCondition
public interface TerminationCondition
- extends Cloneable, InstantiableFromParameterSet, Storable
This interface declares a method that can be used to decide whether another iteration in an optimization should be done or not.
- Author:
- Jens Keilwagen
- See Also:
Optimizer
|
Method Summary |
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. |
doNextIteration
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.
- Parameters:
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 optimization
- Returns:
true if another iteration should be done
isSimple
boolean isSimple()
- This method returns
false if the TerminationCondition uses either
the gradient or the direction for the decision, otherwise it returns true.
- Returns:
false for gradient or direction based TerminationConditions