net.sourceforge.cilib.pso.particle
Class LFDecorator

java.lang.Object
  extended by net.sourceforge.cilib.entity.AbstractEntity
      extended by net.sourceforge.cilib.pso.particle.AbstractParticle
          extended by net.sourceforge.cilib.pso.particle.ParticleDecorator
              extended by net.sourceforge.cilib.pso.particle.LFDecorator
All Implemented Interfaces:
Serializable, Comparable<Entity>, CandidateSolution, Entity, Particle, SocialEntity, Cloneable

public class LFDecorator
extends ParticleDecorator
implements Cloneable

LFDecorator.

Author:
barlad
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.pso.particle.AbstractParticle
neighbourhoodBestUpdateStrategy, personalBestUpdateStrategy, positionInitialisationStrategy, positionUpdateStrategy, velocityInitialisationStrategy, velocityUpdateStrategy
 
Constructor Summary
LFDecorator(Particle target)
          Creates a new instance of LFParticleDecorator.
 
Method Summary
 void calculateFitness()
          Calculate the fitness of the Entity incrementing the number of fitness evaluations for the algorithm.
static LFDecorator extract(Particle particle)
          Deprecated.  
 LFDecorator getClone()
          Make a clone of the Entity the exact semantics of the clone method will be defined by the classes that implements this interface.
 double getDefaultDeltaT()
          Returns the algorithm parameter variable deltaT.
 double getDelta()
          Returns the algorithm parameter variable delta.
 double getDelta1()
          Returns the algorithm parameter variable delta1.
 double getDeltaT()
          Returns the algorithm parameter variable deltaT.
 double getEpsilon()
          Returns the algorithm parameter variable epsilon.
 double[] getGradient()
          Returns the gradient of the particle.
 int getI()
          Returns the algorithm state variable i.
 int getJ()
          Returns the algorithm state variable j.
 int getM()
          Returns the algorithm state variable m.
 double[] getNextGradient()
          Returns the array used to store the future gradient of the particle.
 double getP()
          Returns the algorithm state variable p.
 Vector getPreviousPosition()
          Returns the position of the particle in the previous step.
 Vector getPreviousVelocity()
          Returns the velocity of the particle in the previous step.
 int getS()
          Returns the algorithm state variable s.
 boolean getWasNeighbourhoodBest()
          Returns the algorithm state variable indicating whether the particle was the neighbourhood best in the previous iteration of the algorithm.
 void initialise(OptimisationProblemAdapter problem)
           
 void setDefaultDeltaT(double defaultDeltaT)
          Sets the algorithm parameter variable deltaT.
 void setDelta(double delta)
          Sets the algorithm state variable delta.
 void setDelta1(double delta1)
          Sets the algorithm parameter variable delta1.
 void setDeltaT(double deltaT)
          Sets the algorithm parameter variable deltaT.
 void setEpsilon(double epsilon)
          Sets the algorithm parameter variable epsilon.
 void setI(int i)
          Sets the algorithm state variable i.
 void setJ(int j)
          Sets the algorithm state variable j.
 void setM(int m)
           
 void setP(double p)
          Sets the algorithm state variable p.
 void setS(int s)
          Sets the algorithm state variable s.
 void setWasNeighbourhoodBest(boolean wasNeighbourhoodBest)
          Sets the algorithm state variable indicating whether the particle was the neighbourhood best in the previous iteration of the algorithm.
 void updateVelocity(VelocityUpdateStrategy vu)
           
 
Methods inherited from class net.sourceforge.cilib.pso.particle.ParticleDecorator
calculateFitness, compareTo, equals, getBehaviouralParameters, getBestFitness, getBestPosition, getCandidateSolution, getDimension, getFitness, getId, getNeighbourhoodBest, getPosition, getTarget, getVelocity, getVelocityUpdateStrategy, hashCode, initialise, reinitialise, setBehaviouralParameters, setCandidateSolution, setDimension, setNeighbourhoodBest, setTarget, setVelocityUpdateStrategy, updateControlParameters, updatePosition, updateVelocity
 
Methods inherited from class net.sourceforge.cilib.pso.particle.AbstractParticle
getNeighbourhoodBestUpdateStrategy, getPersonalBestUpdateStrategy, getPositionInitialisationStrategy, getPositionUpdateStrategy, getSocialBestFitness, getVelocityInitialisationStrategy, setNeighbourhoodBestUpdateStrategy, setPersonalBestUpdateStrategy, setPositionInitialisationStrategy, setPositionUpdateStrategy, setVelocityInitialisationStrategy
 
Methods inherited from class net.sourceforge.cilib.entity.AbstractEntity
getFitnessCalculator, getProperties, setFitnessCalculator, setProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.cilib.entity.Entity
getFitnessCalculator, getProperties, setProperties
 

Constructor Detail

LFDecorator

public LFDecorator(Particle target)
Creates a new instance of LFParticleDecorator.

Method Detail

getClone

public LFDecorator getClone()
Description copied from class: AbstractParticle
Make a clone of the Entity the exact semantics of the clone method will be defined by the classes that implements this interface.

Specified by:
getClone in interface Entity
Specified by:
getClone in interface Particle
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class ParticleDecorator
Returns:
the cloned object
See Also:
Object.clone()

calculateFitness

public void calculateFitness()
Description copied from class: AbstractParticle
Calculate the fitness of the Entity incrementing the number of fitness evaluations for the algorithm.

Specified by:
calculateFitness in interface Entity
Overrides:
calculateFitness in class AbstractParticle

updateVelocity

public void updateVelocity(VelocityUpdateStrategy vu)

extract

@Deprecated
public static LFDecorator extract(Particle particle)
Deprecated. 

Parameters:
particle -
Returns:

initialise

public void initialise(OptimisationProblemAdapter problem)

getWasNeighbourhoodBest

public boolean getWasNeighbourhoodBest()
Returns the algorithm state variable indicating whether the particle was the neighbourhood best in the previous iteration of the algorithm.


setWasNeighbourhoodBest

public void setWasNeighbourhoodBest(boolean wasNeighbourhoodBest)
Sets the algorithm state variable indicating whether the particle was the neighbourhood best in the previous iteration of the algorithm.


getDelta

public double getDelta()
Returns the algorithm parameter variable delta.


setDelta

public void setDelta(double delta)
Sets the algorithm state variable delta.


getDeltaT

public double getDeltaT()
Returns the algorithm parameter variable deltaT.


setDeltaT

public void setDeltaT(double deltaT)
Sets the algorithm parameter variable deltaT.


getDefaultDeltaT

public double getDefaultDeltaT()
Returns the algorithm parameter variable deltaT.


setDefaultDeltaT

public void setDefaultDeltaT(double defaultDeltaT)
Sets the algorithm parameter variable deltaT.


getP

public double getP()
Returns the algorithm state variable p.


setP

public void setP(double p)
Sets the algorithm state variable p.


getDelta1

public double getDelta1()
Returns the algorithm parameter variable delta1.


setDelta1

public void setDelta1(double delta1)
Sets the algorithm parameter variable delta1.


getS

public int getS()
Returns the algorithm state variable s.


setS

public void setS(int s)
Sets the algorithm state variable s.


getM

public int getM()
Returns the algorithm state variable m.


setM

public void setM(int m)

getI

public int getI()
Returns the algorithm state variable i.


setI

public void setI(int i)
Sets the algorithm state variable i.


getJ

public int getJ()
Returns the algorithm state variable j.


setJ

public void setJ(int j)
Sets the algorithm state variable j.


getEpsilon

public double getEpsilon()
Returns the algorithm parameter variable epsilon.


setEpsilon

public void setEpsilon(double epsilon)
Sets the algorithm parameter variable epsilon.


getPreviousPosition

public Vector getPreviousPosition()
Returns the position of the particle in the previous step.


getPreviousVelocity

public Vector getPreviousVelocity()
Returns the velocity of the particle in the previous step.


getGradient

public double[] getGradient()
Returns the gradient of the particle.


getNextGradient

public double[] getNextGradient()
Returns the array used to store the future gradient of the particle.



Copyright © 2009 CIRG. All Rights Reserved.