net.sourceforge.cilib.pso.moo.guideupdatestrategies
Class DominantGuideUpdateStrategy

java.lang.Object
  extended by net.sourceforge.cilib.pso.moo.guideupdatestrategies.DominantGuideUpdateStrategy
All Implemented Interfaces:
Serializable, GuideUpdateStrategy, Cloneable

public class DominantGuideUpdateStrategy
extends Object
implements GuideUpdateStrategy

Implementation of GuideUpdateStrategy where a particle's guide gets updated if and only if the new guide dominates the previous guide.

Author:
Wiehann Matthysen
See Also:
Serialized Form

Constructor Summary
DominantGuideUpdateStrategy()
           
DominantGuideUpdateStrategy(GuideUpdateStrategy copy)
           
 
Method Summary
 DominantGuideUpdateStrategy getClone()
          Create a cloned copy of the current object and return it.
 void updateGuide(Particle particle, EntityType.Particle.Guide guideType, Vector newGuide)
          Determines if particle's guide (either local or global depending on guideType) should be updated, and updates it with newGuide.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DominantGuideUpdateStrategy

public DominantGuideUpdateStrategy()

DominantGuideUpdateStrategy

public DominantGuideUpdateStrategy(GuideUpdateStrategy copy)
Method Detail

getClone

public DominantGuideUpdateStrategy getClone()
Description copied from interface: Cloneable
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface GuideUpdateStrategy
Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

updateGuide

public void updateGuide(Particle particle,
                        EntityType.Particle.Guide guideType,
                        Vector newGuide)
Description copied from interface: GuideUpdateStrategy
Determines if particle's guide (either local or global depending on guideType) should be updated, and updates it with newGuide.

Specified by:
updateGuide in interface GuideUpdateStrategy
Parameters:
particle - The particle who's guide is to be updated.
guideType - If the local or global guide should be updated.
newGuide - The new guide that should replace the old guide, if it is to be updated.


Copyright © 2009 CIRG. All Rights Reserved.