org.dishevelled.swarm.exit
Class FitnessThresholdExitStrategy

java.lang.Object
  extended by org.dishevelled.swarm.exit.FitnessThresholdExitStrategy
All Implemented Interfaces:
ExitStrategy

public final class FitnessThresholdExitStrategy
extends Object
implements ExitStrategy

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

Version:
$Revision$ $Date$
Author:
Michael Heuer

Constructor Summary
FitnessThresholdExitStrategy(double threshold)
          Create a new fitness threshold exit strategy with the specified threshold.
 
Method Summary
 boolean evaluate(ParticleSwarm swarm, int epoch)
          Return true if the specified particle swarm 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(ParticleSwarm swarm,
                        int epoch)
Return true if the specified particle swarm has met the criteria of this exit strategy function. The particle swarm will not be null.

Specified by:
evaluate in interface ExitStrategy
Parameters:
swarm - particle swarm
epoch - epoch
Returns:
true if the specified particle swarm has met the criteria of this exit strategy function


Copyright © 2006-2012 dishevelled.org. All Rights Reserved.