net.sourceforge.cilib.pso.positionupdatestrategies
Class BinaryPositionUpdateStrategy

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

public class BinaryPositionUpdateStrategy
extends Object
implements PositionUpdateStrategy

Binary position update strategy to enable the BinaryPSO.

Author:
Gary Pampara
See Also:
Serialized Form

Constructor Summary
BinaryPositionUpdateStrategy()
          Create an instance of BinaryPositionUpdateStrategy.
BinaryPositionUpdateStrategy(BinaryPositionUpdateStrategy copy)
          Create a copy of the provided instance.
 
Method Summary
 BinaryPositionUpdateStrategy getClone()
          Clone the stategy by creating a new object with the same contents and values as the current object.
 Sigmoid getSigmoid()
          Get the sigmoid function used within the update strategy.
 void setSigmoid(Sigmoid sigmoid)
          Set the sigmoid function to use.
 void updatePosition(Particle particle)
          BinaryPSO particle position update, as defined by Kennedy and Eberhart.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryPositionUpdateStrategy

public BinaryPositionUpdateStrategy()
Create an instance of BinaryPositionUpdateStrategy.


BinaryPositionUpdateStrategy

public BinaryPositionUpdateStrategy(BinaryPositionUpdateStrategy copy)
Create a copy of the provided instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public BinaryPositionUpdateStrategy 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)
BinaryPSO particle position update, as defined by Kennedy and Eberhart.

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

getSigmoid

public Sigmoid getSigmoid()
Get the sigmoid function used within the update strategy.

Returns:
The Sigmoid function used.

setSigmoid

public void setSigmoid(Sigmoid sigmoid)
Set the sigmoid function to use.

Parameters:
sigmoid - The function to set.


Copyright © 2009 CIRG. All Rights Reserved.