|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlio.search.pso.Particle
public abstract class Particle
This class implement the basic components of a particle. Since the way of representing the velocity depends on the kind of data each subclass must define it.
Field Summary | |
---|---|
protected Particle |
bestNeighbour
Reference to other particle that is the best of the neighbourhood |
protected Individual |
bestPosition
Best position and fitness of the particle |
protected Individual |
currentPosition
Current position and fitness of the particle |
Constructor Summary | |
---|---|
Particle()
|
Method Summary | |
---|---|
double |
bestValue()
|
Particle |
getBestNeighbour()
|
Individual |
getBestPosition()
|
Individual |
getCurrentPosition()
|
void |
move()
Moves the particle according to its velocity |
abstract void |
newPoint()
Calculates the new point |
void |
setBestNeighbour(Particle bestNeighbour)
|
void |
setBestPosition(Individual bestPosition)
|
void |
setCurrentPosition(Individual currentPosition)
|
double |
value()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Individual currentPosition
protected Individual bestPosition
protected Particle bestNeighbour
Constructor Detail |
---|
public Particle()
Method Detail |
---|
public void move()
public abstract void newPoint()
public double value()
public double bestValue()
public Particle getBestNeighbour()
public void setBestNeighbour(Particle bestNeighbour)
bestNeighbour
- the bestNeighbour to setpublic Individual getBestPosition()
public void setBestPosition(Individual bestPosition)
bestPosition
- the bestPosition to setpublic Individual getCurrentPosition()
public void setCurrentPosition(Individual currentPosition)
currentPosition
- the currentPosition to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |