net.sourceforge.cilib.stoppingcondition.StoppingCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cilib-library Show documentation
Show all versions of cilib-library Show documentation
A library of composable components enabling simpler Computational Intelligence
The newest version!
/** __ __
* _____ _/ /_/ /_ Computational Intelligence Library (CIlib)
* / ___/ / / / __ \ (c) CIRG @ UP
* / /__/ / / / /_/ / http://cilib.net
* \___/_/_/_/_.___/
*/
package net.sourceforge.cilib.stoppingcondition;
import com.google.common.base.Predicate;
import net.sourceforge.cilib.algorithm.Algorithm;
import net.sourceforge.cilib.util.Cloneable;
/**
* A class that implements this interface can be used to measure the progress of
* an algorithm. Primarily, subclasses of this interface are used to determine
* the stopping criteria for an {@link Algorithm}. Stopping conditions are
* applied to algorithms using
* {@link net.sourceforge.cilib.algorithm.Stoppable#addStoppingCondition(StoppingCondition)}.
*
* Stopping conditions are also useful for implementing graphical progress bars and varying inertia
* weights etc.
*/
public interface StoppingCondition extends Predicate, Cloneable {
/**
* Determines the percentage complete for the associated algorithm.
* @return the percentage completed as a fraction {@literal (0 <= i <= 1.0)}.
*/
public double getPercentageCompleted(T algorithm);
/**
* {@inheritDoc}
*/
@Override
public StoppingCondition getClone();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy