Class OrStopConditions
- java.lang.Object
-
- dev.nm.misc.algorithm.stopcondition.OrStopConditions
-
- All Implemented Interfaces:
StopCondition
public class OrStopConditions extends Object implements StopCondition
Combines an arbitrary number of stop conditions, terminating when the first condition is met.
-
-
Constructor Summary
Constructors Constructor Description OrStopConditions(StopCondition... conditions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisStopped(Vector x, double... information)This is called after each iteration to determine whether the termination conditions are met, e.g., convergence.
-
-
-
Constructor Detail
-
OrStopConditions
public OrStopConditions(StopCondition... conditions)
-
-
Method Detail
-
isStopped
public boolean isStopped(Vector x, double... information)
Description copied from interface:StopConditionThis is called after each iteration to determine whether the termination conditions are met, e.g., convergence.- Specified by:
isStoppedin interfaceStopCondition- Parameters:
x- the current state of the algorithminformation- auxiliary information, e.g., the energy at a given state- Returns:
trueif the iteration should stop
-
-