EvolvingObjects
|
One of the local best strategies for particle swarm optimization. More...
#include <eoLinearTopology.h>
Public Member Functions | |
eoLinearTopology (unsigned _neighborhoodSize) | |
Build the topology made of _neighborhoodSize neighborhoods. | |
void | setup (const eoPop< POT > &_pop) |
Build the neighborhoods contained in the topology. | |
unsigned | retrieveNeighborhoodByIndice (unsigned _indice) |
Retrieve the neighboorhood of a particle. | |
void | updateNeighborhood (POT &_po, unsigned _indice) |
Update the neighborhood: update the particle's best fitness and the best particle of the corresponding neighborhood. | |
POT & | best (unsigned _indice) |
Return the best informative of a particle. | |
virtual POT & | globalBest () |
void | printOn () |
Print the structure of the topology on the standrad output. | |
Protected Attributes | |
std::vector < eoSocialNeighborhood< POT > > | neighborhoods |
unsigned | neighborhoodSize |
bool | isSetup |
One of the local best strategies for particle swarm optimization.
Each particle has a fixed number of neighbours, ans the neighborhood is social. The topology is never modified during the flight.
Definition at line 43 of file eoLinearTopology.h.
eoLinearTopology< POT >::eoLinearTopology | ( | unsigned | _neighborhoodSize | ) | [inline] |
Build the topology made of _neighborhoodSize neighborhoods.
_neighborhoodSize | - The size of each neighborhood. |
Definition at line 53 of file eoLinearTopology.h.
void eoLinearTopology< POT >::setup | ( | const eoPop< POT > & | _pop | ) | [inline, virtual] |
Build the neighborhoods contained in the topology.
_pop | - The population used to build the neighborhoods. If it remains several particle (because _pop.size()neighborhoodSize !=0), there are inserted in the last neighborhood. So it may be possible to have a bigger neighborhood. |
Implements eoTopology< POT >.
Definition at line 62 of file eoLinearTopology.h.
References eoSocialNeighborhood< POT >::best(), and eoSocialNeighborhood< POT >::put().
unsigned eoLinearTopology< POT >::retrieveNeighborhoodByIndice | ( | unsigned | _indice | ) | [inline] |
Retrieve the neighboorhood of a particle.
Definition at line 120 of file eoLinearTopology.h.
Referenced by eoLinearTopology< POT >::best(), and eoLinearTopology< POT >::updateNeighborhood().
POT& eoLinearTopology< POT >::best | ( | unsigned | _indice | ) | [inline, virtual] |
Return the best informative of a particle.
Could be itself.
_indice | - The indice of a particle in the population |
Implements eoTopology< POT >.
Definition at line 160 of file eoLinearTopology.h.
References eoLinearTopology< POT >::retrieveNeighborhoodByIndice().