|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StoppingCondition
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
Algorithm
. Stopping coditions are applied to algorithms
using Algorithm.addStoppingCondition(StoppingCondition)
.
Stopping conditions are also useful for implementing graphical progress bars and varying inertia weights etc.
Field Summary | |
---|---|
static byte |
CICLOPS_EXCLUDE_ALGORITHM
|
Method Summary | |
---|---|
StoppingCondition |
getClone()
Create a cloned copy of the current object and return it. |
double |
getPercentageCompleted()
Determines the percentage complete for the associated algorithm. |
boolean |
isCompleted()
Determines whether the stopping condition has been satisfied (equivalent to getPercentageCompleted() == 1.0 but may be more efficient). |
void |
setAlgorithm(Algorithm algorithm)
Sets the algorithm that this stopping condition should be applied to. |
Field Detail |
---|
static final byte CICLOPS_EXCLUDE_ALGORITHM
Method Detail |
---|
double getPercentageCompleted()
boolean isCompleted()
getPercentageCompleted()
== 1.0 but may be more efficient).
void setAlgorithm(Algorithm algorithm)
Algorithm.addStoppingCondition(StoppingCondition)
. This ensures that any down casting
necessary is done only once, when the stopping codition is added to an alogorithm (as apposed
to after each iteration).
algorithm
- The applicable Algorithm
.StoppingCondition getClone()
Cloneable
getClone
in interface Cloneable
Object.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |