Class AndStopConditions
- java.lang.Object
-
- dev.nm.misc.algorithm.stopcondition.AndStopConditions
-
- All Implemented Interfaces:
StopCondition
public class AndStopConditions extends Object implements StopCondition
Combines an arbitrary number of stop conditions, terminating when all conditions are met.
-
-
Constructor Summary
Constructors Constructor Description AndStopConditions(StopCondition... conditions)
-
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.
-
-
-
Constructor Detail
-
AndStopConditions
public AndStopConditions(StopCondition... conditions)
-
-
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
-
-