org.dishevelled.swarm.exit
Class EpochLimitExitStrategy

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

public final class EpochLimitExitStrategy
extends Object
implements ExitStrategy

Epoch limit exit strategy. Exits as soon as the epoch meets or exceeds a set epoch limit.

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

Constructor Summary
EpochLimitExitStrategy(int epochLimit)
          Create a new epoch limit exit strategy with the specified epoch limit.
 
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

EpochLimitExitStrategy

public EpochLimitExitStrategy(int epochLimit)
Create a new epoch limit exit strategy with the specified epoch limit.

Parameters:
epochLimit - epoch limit for this epoch limit exit strategy, must be >= 0
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.