Class AfterIterations
- java.lang.Object
-
- dev.nm.misc.algorithm.stopcondition.AfterIterations
-
- All Implemented Interfaces:
StopCondition
public class AfterIterations extends Object implements StopCondition
Stops after a given number of iterations.
-
-
Constructor Summary
Constructors Constructor Description AfterIterations(int maxIterations)
Stops after a given number of iterations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isStopped(Vector x, double... information)
This is called after each iteration to determine whether the termination conditions are met, e.g., convergence.
-
-
-
Method Detail
-
isStopped
public boolean isStopped(Vector x, double... information)
Description copied from interface:StopCondition
This is called after each iteration to determine whether the termination conditions are met, e.g., convergence.- Specified by:
isStopped
in interfaceStopCondition
- Parameters:
x
- the current state of the algorithminformation
- auxiliary information, e.g., the energy at a given state- Returns:
true
if the iteration should stop
-
-