net.sourceforge.cilib.pso.positionupdatestrategies
Class StandardPersonalBestUpdateStrategy
java.lang.Object
net.sourceforge.cilib.pso.positionupdatestrategies.StandardPersonalBestUpdateStrategy
- All Implemented Interfaces:
- Serializable, PersonalBestUpdateStrategy, Cloneable
- Direct Known Subclasses:
- BoundedPersonalBestUpdateStrategy
public class StandardPersonalBestUpdateStrategy
- extends Object
- implements PersonalBestUpdateStrategy
Update the personal best of the particle, based on the standard PSO definition
of the process.
- Author:
- gpampara
- See Also:
- Serialized Form
Method Summary |
PersonalBestUpdateStrategy |
getClone()
Create a cloned copy of the current object and return it. |
void |
updatePersonalBest(Particle particle)
If the current fitness is better than the current best fitness, update
the best fitness of the particle to equal the current fitness and make
the personal best position a clone of the current particle position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StandardPersonalBestUpdateStrategy
public StandardPersonalBestUpdateStrategy()
getClone
public PersonalBestUpdateStrategy getClone()
- 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 PersonalBestUpdateStrategy
- Specified by:
getClone
in interface Cloneable
- Returns:
- An exact clone of the current object instance.
- See Also:
Object.clone()
updatePersonalBest
public void updatePersonalBest(Particle particle)
- If the current fitness is better than the current best fitness, update
the best fitness of the particle to equal the current fitness and make
the personal best position a clone of the current particle position.
- Specified by:
updatePersonalBest
in interface PersonalBestUpdateStrategy
- Parameters:
particle
- The particle to update.
Copyright © 2009 CIRG. All Rights Reserved.