net.sourceforge.cilib.pso.positionupdatestrategies
Class StandardPositionUpdateStrategy

java.lang.Object
  extended by net.sourceforge.cilib.pso.positionupdatestrategies.StandardPositionUpdateStrategy
All Implemented Interfaces:
Serializable, PositionUpdateStrategy, Cloneable

public class StandardPositionUpdateStrategy
extends Object
implements PositionUpdateStrategy

This is the normal position update as described by Kennedy and Eberhart.

Author:
Gary Pampara
See Also:
Serialized Form

Constructor Summary
StandardPositionUpdateStrategy()
          Create an new instance of StandardPositionUpdateStrategy.
StandardPositionUpdateStrategy(StandardPositionUpdateStrategy copy)
          Copy constructor.
 
Method Summary
 StandardPositionUpdateStrategy getClone()
          Clone the stategy by creating a new object with the same contents and values as the current object.
 void updatePosition(Particle particle)
          Update the position of the Particle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardPositionUpdateStrategy

public StandardPositionUpdateStrategy()
Create an new instance of StandardPositionUpdateStrategy.


StandardPositionUpdateStrategy

public StandardPositionUpdateStrategy(StandardPositionUpdateStrategy copy)
Copy constructor. Copy the provided instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public StandardPositionUpdateStrategy getClone()
Clone the stategy by creating a new object with the same contents and values as the current object.

Specified by:
getClone in interface PositionUpdateStrategy
Specified by:
getClone in interface Cloneable
Returns:
A clone of the current PositionUpdateStrategy
See Also:
Object.clone()

updatePosition

public void updatePosition(Particle particle)
Update the position of the Particle.

Specified by:
updatePosition in interface PositionUpdateStrategy
Parameters:
particle - The Particle to perform the position update on.


Copyright © 2009 CIRG. All Rights Reserved.