net.sourceforge.cilib.pso.particle
Class DeviationDecorator

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.DeviationDecorator
All Implemented Interfaces:
Serializable, Comparable<Entity>, CandidateSolution, Entity, Particle, SocialEntity, Cloneable

public class DeviationDecorator
extends ParticleDecorator
implements Cloneable

Author:
Edwin Peer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.pso.particle.AbstractParticle
neighbourhoodBestUpdateStrategy, personalBestUpdateStrategy, positionInitialisationStrategy, positionUpdateStrategy, velocityInitialisationStrategy, velocityUpdateStrategy
 
Constructor Summary
DeviationDecorator(Particle target, int observations)
           
 
Method Summary
 void calculateFitness()
          Calculate the fitness of the Entity incrementing the number of fitness evaluations for the algorithm.
 int compareTo(Entity o)
          
 boolean equals(Object object)
           It doesn;t make sense to compare the meta data of the entity.
static DeviationDecorator extract(Particle particle)
          Deprecated. 
 DeviationDecorator 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 getFitnessDeviation()
           
 double getPositionDeviation()
           
 int hashCode()
          
 void initialise(OptimisationProblem problem)
          The initialise method overrides the parent class initialise method.
 void reset()
           
 void updatePosition()
          Update the position of the Particle.
 
Methods inherited from class net.sourceforge.cilib.pso.particle.ParticleDecorator
calculateFitness, getBehaviouralParameters, getBestFitness, getBestPosition, getCandidateSolution, getDimension, getFitness, getId, getNeighbourhoodBest, getPosition, getTarget, getVelocity, getVelocityUpdateStrategy, reinitialise, setBehaviouralParameters, setCandidateSolution, setDimension, setNeighbourhoodBest, setTarget, setVelocityUpdateStrategy, updateControlParameters, 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

DeviationDecorator

public DeviationDecorator(Particle target,
                          int observations)
Method Detail

getClone

public DeviationDecorator getClone()
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()

equals

public boolean equals(Object object)
Description copied from class: AbstractParticle
It doesn;t make sense to compare the meta data of the entity. In other words, the properties of the entity may vary, but the entity is still the same entity.

Overrides:
equals in class ParticleDecorator
Parameters:
object - The object to compare equality.

hashCode

public int hashCode()
Description copied from class: AbstractParticle

Overrides:
hashCode in class ParticleDecorator

initialise

public void initialise(OptimisationProblem problem)
The initialise method overrides the parent class initialise method. The fitness[] and positions[][] instance fields are instantiated.

Specified by:
initialise in interface Entity
Overrides:
initialise in class ParticleDecorator
Parameters:
problem -
i -

updatePosition

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

Specified by:
updatePosition in interface Particle
Overrides:
updatePosition in class ParticleDecorator

getFitnessDeviation

public double getFitnessDeviation()

getPositionDeviation

public double getPositionDeviation()

reset

public void reset()

extract

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


compareTo

public int compareTo(Entity o)
Description copied from class: AbstractParticle

Specified by:
compareTo in interface Comparable<Entity>
Specified by:
compareTo in interface Entity
Overrides:
compareTo in class ParticleDecorator

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


Copyright © 2009 CIRG. All Rights Reserved.