org.dishevelled.evolve.exit
Class FitnessThresholdExitStrategy<I>

java.lang.Object
  extended by org.dishevelled.evolve.exit.FitnessThresholdExitStrategy<I>
Type Parameters:
I - individual type
All Implemented Interfaces:
ExitStrategy<I>

public final class FitnessThresholdExitStrategy<I>
extends Object
implements ExitStrategy<I>

Fitness threshold exit strategy. Exits as soon as at least one individual has a fitness score above a set threshold.

Version:
$Revision: 1059 $ $Date: 2012-01-03 14:03:02 -0600 (Tue, 03 Jan 2012) $
Author:
Michael Heuer

Constructor Summary
FitnessThresholdExitStrategy(double threshold)
          Create a new fitness threshold exit strategy with the specified threshold.
 
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
 

Constructor Detail

FitnessThresholdExitStrategy

public FitnessThresholdExitStrategy(double threshold)
Create a new fitness threshold exit strategy with the specified threshold.

Parameters:
threshold - threshold for this fitness threshold exit strategy
Method Detail

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 - population
scores - fitness scores
time - 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).