|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.entity.AbstractEntity net.sourceforge.cilib.pso.particle.AbstractParticle net.sourceforge.cilib.pso.particle.ParticleDecorator
public abstract class ParticleDecorator
Field Summary |
---|
Fields inherited from class net.sourceforge.cilib.pso.particle.AbstractParticle |
---|
neighbourhoodBestUpdateStrategy, personalBestUpdateStrategy, positionInitialisationStrategy, positionUpdateStrategy, velocityInitialisationStrategy, velocityUpdateStrategy |
Constructor Summary | |
---|---|
ParticleDecorator()
|
|
ParticleDecorator(Particle target)
|
Method Summary | |
---|---|
void |
calculateFitness(boolean count)
Calculate the fitness of the Entity . |
int |
compareTo(Entity o)
|
boolean |
equals(Object object)
It doesn;t make sense to compare the meta data of the entity. |
Type |
getBehaviouralParameters()
|
Fitness |
getBestFitness()
Return the best fitness associated with this Entity, provided a best fitness is defined on the Entity. |
StructuredType |
getBestPosition()
Get the best position of the Particle. |
StructuredType |
getCandidateSolution()
Get the value of the CandidateSolution maintained by this Entity. |
abstract ParticleDecorator |
getClone()
Make a clone of the Entity the exact semantics of the clone method will be defined by the classes that implements this interface. |
int |
getDimension()
Returns the dimension of the Entity. |
Fitness |
getFitness()
Get the fitness of the CandidateSolution maintained by this Entity. |
long |
getId()
Get the identifier associated with the Entity instance. |
Particle |
getNeighbourhoodBest()
Get the current Particle's neighbourhood best. |
StructuredType |
getPosition()
Get the position of the Particle. |
Particle |
getTarget()
|
StructuredType |
getVelocity()
Get the velocity representation of the Particle. |
VelocityUpdateStrategy |
getVelocityUpdateStrategy()
Get the VelocityUpdateStrategy
of the current particle. |
int |
hashCode()
|
void |
initialise(OptimisationProblem problem)
Intialise the Entity to something meaningful and within the problem space. |
void |
reinitialise()
Re-initialise the given Entity within the defined domain. |
void |
setBehaviouralParameters(Type type)
|
void |
setCandidateSolution(StructuredType type)
Set the Type maintained by this Entitys CandidateSolution. |
void |
setDimension(int dim)
|
void |
setNeighbourhoodBest(Particle particle)
Set the neighbourhood best particle for the current Particle based on the topology of the current particle. |
void |
setTarget(Particle target)
|
void |
setVelocityUpdateStrategy(VelocityUpdateStrategy velocityUpdateStrategy)
Set the velocity updating strategy for the particle. |
void |
updateControlParameters()
Update all the ControlParameters that are maintained within the Particle. |
void |
updatePosition()
Update the position of the Particle. |
void |
updateVelocity()
Update the velocity of the Particle. |
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 |
---|
public ParticleDecorator()
public ParticleDecorator(Particle target)
Method Detail |
---|
public boolean equals(Object object)
AbstractParticle
equals
in class AbstractParticle
object
- The object to compare equality.public int hashCode()
AbstractParticle
hashCode
in class AbstractParticle
public void setTarget(Particle target)
public Particle getTarget()
public abstract ParticleDecorator getClone()
AbstractParticle
getClone
in interface Entity
getClone
in interface Particle
getClone
in interface Cloneable
getClone
in class AbstractParticle
Object.clone()
public Fitness getBestFitness()
AbstractParticle
getBestFitness
in interface Entity
getBestFitness
in interface Particle
getBestFitness
in class AbstractParticle
public StructuredType getBestPosition()
AbstractParticle
getBestPosition
in interface Particle
getBestPosition
in class AbstractParticle
public int getDimension()
AbstractParticle
getDimension
in interface Entity
getDimension
in interface Particle
getDimension
in class AbstractParticle
public Fitness getFitness()
AbstractEntity
getFitness
in interface CandidateSolution
getFitness
in interface Entity
getFitness
in interface Particle
getFitness
in class AbstractEntity
public long getId()
AbstractEntity
Entity
instance.
getId
in interface Entity
getId
in class AbstractEntity
public Particle getNeighbourhoodBest()
AbstractParticle
getNeighbourhoodBest
in interface Particle
getNeighbourhoodBest
in class AbstractParticle
public StructuredType getPosition()
AbstractParticle
getPosition
in interface Particle
getPosition
in class AbstractParticle
public StructuredType getVelocity()
AbstractParticle
getVelocity
in interface Particle
getVelocity
in class AbstractParticle
public void initialise(OptimisationProblem problem)
Entity
problem
- The OptimisationProblem to based the initialisation on.public void updatePosition()
AbstractParticle
updatePosition
in interface Particle
updatePosition
in class AbstractParticle
public void calculateFitness(boolean count)
AbstractParticle
Entity
. This method may or may not
increment the number of fitness evaluations of the algorithm.
calculateFitness
in interface Entity
calculateFitness
in class AbstractParticle
count
- Add or do not add this fitness evaluation to the algorithm global count.public void setNeighbourhoodBest(Particle particle)
AbstractParticle
setNeighbourhoodBest
in interface Particle
setNeighbourhoodBest
in class AbstractParticle
particle
- The particle to use as the current particle's neighhod best particlepublic void updateVelocity()
AbstractParticle
updateVelocity
in interface Particle
updateVelocity
in class AbstractParticle
public void updateControlParameters()
AbstractParticle
updateControlParameters
in interface Particle
updateControlParameters
in class AbstractParticle
public VelocityUpdateStrategy getVelocityUpdateStrategy()
AbstractParticle
VelocityUpdateStrategy
of the current particle.
getVelocityUpdateStrategy
in interface Particle
getVelocityUpdateStrategy
in class AbstractParticle
public void setVelocityUpdateStrategy(VelocityUpdateStrategy velocityUpdateStrategy)
AbstractParticle
setVelocityUpdateStrategy
in interface Particle
setVelocityUpdateStrategy
in class AbstractParticle
velocityUpdateStrategy
- The velocityUpdateStrategy to set.public StructuredType getCandidateSolution()
AbstractEntity
getCandidateSolution
in interface CandidateSolution
getCandidateSolution
in interface Entity
getCandidateSolution
in class AbstractEntity
public void setCandidateSolution(StructuredType type)
AbstractEntity
setCandidateSolution
in interface CandidateSolution
setCandidateSolution
in interface Entity
setCandidateSolution
in class AbstractEntity
type
- The Type that will be the new value of the
Entity CandidateSolution.public int compareTo(Entity o)
AbstractParticle
compareTo
in interface Comparable<Entity>
compareTo
in interface Entity
compareTo
in class AbstractParticle
public void setDimension(int dim)
public Type getBehaviouralParameters()
public void setBehaviouralParameters(Type type)
public void reinitialise()
Entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |