Class 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 Detail

      • OrStopConditions

        public OrStopConditions​(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 interface StopCondition
        Parameters:
        x - the current state of the algorithm
        information - auxiliary information, e.g., the energy at a given state
        Returns:
        true if the iteration should stop