|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.uncommons.watchmaker.framework.termination.UserAbort
public final class UserAbort
TerminationCondition
implementation that allows for user-initiated
termination of an evolutionary algorithm. This condition can be used, for
instance, to provide a button on a GUI that terminates execution. The
application should retain a reference to the instance after passing it to
the evolution engine and should invoke the abort()
method to make
the evolution terminate at the end of the current generation.
AbortControl
Constructor Summary | |
---|---|
UserAbort()
|
Method Summary | |
---|---|
void |
abort()
Aborts any evolutionary algorithms that monitor this termination condition instance. |
boolean |
isAborted()
|
void |
reset()
Resets the abort condition to false so that it may be reused. |
boolean |
shouldTerminate(PopulationData<?> populationData)
The condition is queried via this method to determine whether or not evolution should finish at the current point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserAbort()
Method Detail |
---|
public boolean shouldTerminate(PopulationData<?> populationData)
shouldTerminate
in interface TerminationCondition
populationData
- Information about the current state of evolution. This may
be used to determine whether evolution should continue or not.
public void abort()
public boolean isAborted()
abort()
method has been invoked, false otherwise.public void reset()
|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |