|
||||||||||
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.StandardParticle
public class StandardParticle
Field Summary | |
---|---|
protected Particle |
neighbourhoodBest
|
Fields inherited from class net.sourceforge.cilib.pso.particle.AbstractParticle |
---|
neighbourhoodBestUpdateStrategy, personalBestUpdateStrategy, positionInitialisationStrategy, positionUpdateStrategy, velocityInitialisationStrategy, velocityUpdateStrategy |
Constructor Summary | |
---|---|
StandardParticle()
Creates a new instance of StandardParticle. |
|
StandardParticle(StandardParticle copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
void |
calculateFitness(boolean count)
Calculate the fitness of the Entity . |
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. |
Vector |
getBestPosition()
Get the best position of the Particle. |
StandardParticle |
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. |
Particle |
getNeighbourhoodBest()
Get the current Particle's neighbourhood best. |
Vector |
getPosition()
Get the position of the Particle. |
Vector |
getVelocity()
Get the velocity representation of the 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 |
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 |
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 |
---|
getCandidateSolution, getFitness, getFitnessCalculator, getId, getProperties, setCandidateSolution, 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.Particle |
---|
getFitness |
Methods inherited from interface net.sourceforge.cilib.entity.Entity |
---|
getCandidateSolution, getFitnessCalculator, getId, getProperties, setCandidateSolution, setProperties |
Field Detail |
---|
protected Particle neighbourhoodBest
Constructor Detail |
---|
public StandardParticle()
public StandardParticle(StandardParticle copy)
copy
- The instance to copy.Method Detail |
---|
public StandardParticle getClone()
getClone
in interface Entity
getClone
in interface Particle
getClone
in interface Cloneable
getClone
in class AbstractParticle
Object.clone()
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 Fitness getBestFitness()
getBestFitness
in interface Entity
getBestFitness
in interface Particle
getBestFitness
in class AbstractParticle
public Vector getBestPosition()
getBestPosition
in interface Particle
getBestPosition
in class AbstractParticle
public int getDimension()
getDimension
in interface Entity
getDimension
in interface Particle
getDimension
in class AbstractParticle
public Particle getNeighbourhoodBest()
getNeighbourhoodBest
in interface Particle
getNeighbourhoodBest
in class AbstractParticle
public Vector getPosition()
getPosition
in interface Particle
getPosition
in class AbstractParticle
public Vector getVelocity()
getVelocity
in interface Particle
getVelocity
in class AbstractParticle
public void initialise(OptimisationProblem problem)
problem
- The OptimisationProblem to based the initialisation on.public void updatePosition()
updatePosition
in interface Particle
updatePosition
in class AbstractParticle
public void calculateFitness(boolean count)
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)
setNeighbourhoodBest
in interface Particle
setNeighbourhoodBest
in class AbstractParticle
particle
- The particle to use as the current particle's neighhod best particlepublic void updateVelocity()
updateVelocity
in interface Particle
updateVelocity
in class AbstractParticle
public void updateControlParameters()
updateControlParameters
in interface Particle
updateControlParameters
in class AbstractParticle
public void setDimension(int dim)
public Type getBehaviouralParameters()
public void setBehaviouralParameters(Type type)
public void reinitialise()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |