public class Particle extends Individual
Particle extends the Individual by an id, a velocity
Genotype, a personal best Genotype and the corresponding best
Objectives.Individual.State| Modifier and Type | Method and Description |
|---|---|
Genotype |
getBest()
Returns the best position.
|
Objectives |
getBestObjectives()
Returns the best objectives.
|
int |
getId()
Returns the id.
|
Genotype |
getVelocity()
Returns the velocity.
|
void |
setBest(Genotype best,
Objectives objectives)
Sets the best position.
|
void |
setId(int id)
Sets the id.
|
void |
setVelocity(Genotype velocity)
Sets the velocity.
|
getGenotype, getObjectives, getPhenotype, getState, isDecoded, isEvaluated, setGenotype, setObjectives, setPhenotype, setState@Inject public Particle()
Particle.public Genotype getVelocity()
setVelocity(org.opt4j.core.Genotype)public void setVelocity(Genotype velocity)
velocity - the velocity to setgetVelocity()public Genotype getBest()
setBest(org.opt4j.core.Genotype, org.opt4j.core.Objectives)public Objectives getBestObjectives()
setBest(org.opt4j.core.Genotype, org.opt4j.core.Objectives)public void setBest(Genotype best, Objectives objectives)
best - the best to setobjectives - the corresponding best objectivesgetBest()public int getId()
setId(int)public void setId(int id)
id - the id to setgetId()