org.dishevelled.evolve.exit
Class TimeLimitExitStrategy<I>
java.lang.Object
org.dishevelled.evolve.exit.TimeLimitExitStrategy<I>
- Type Parameters:
I - individual type
- All Implemented Interfaces:
- ExitStrategy<I>
public final class TimeLimitExitStrategy<I>
- extends Object
- implements ExitStrategy<I>
Time limit exit strategy. Exits as soon as
the time (in number of generations) meets or exceeds a set
time limit.
- Version:
- $Revision: 1059 $ $Date: 2012-01-03 14:03:02 -0600 (Tue, 03 Jan 2012) $
- Author:
- Michael Heuer
|
Constructor Summary |
TimeLimitExitStrategy(int timeLimit)
Create a new time limit exit strategy with the specified time limit. |
|
Method Summary |
boolean |
evaluate(Collection<I> population,
WeightedMap<I> scores,
int time)
Return true if the specified population has met
the criteria of this exit strategy function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeLimitExitStrategy
public TimeLimitExitStrategy(int timeLimit)
- Create a new time limit exit strategy with the specified time limit.
- Parameters:
timeLimit - time limit for this time limit exit strategy, must be
>= 1
evaluate
public boolean evaluate(Collection<I> population,
WeightedMap<I> scores,
int time)
- Return
true if the specified population has met
the criteria of this exit strategy function.
- Specified by:
evaluate in interface ExitStrategy<I>
- Parameters:
population - populationscores - fitness scorestime - time
- Returns:
- true if the specified population has met the criteria
of this exit strategy function
Copyright (c) 2005-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).