EvolvingObjects
|
Derivated from eoNeighborhood. More...
#include <eoSocialNeighborhood.h>
Public Member Functions | |
void | put (unsigned _oneIndice) |
Put a particle (identified by its indice in its population) in the neighborhood. | |
bool | contains (unsigned _oneIndice) |
Return true if the neighborhood contains the indice (= that means "contains the
particle whose indice is _oneIndice") | |
std::vector< unsigned > | getInformatives () |
Return the list of particle indices as a vector. | |
unsigned | size () |
Return the size of the neighborhood. | |
unsigned | get (unsigned _index) |
Return the "_index-th" particle of the neighborhood. | |
POT & | best () |
Return the best particle of the neighborhood. | |
void | best (POT _particle) |
Set the best particle of the neighborhood. | |
Protected Attributes | |
std::vector< unsigned > | indicesList |
POT | lBest |
Derivated from eoNeighborhood.
Just takes relationships into account. The neighborhood is defined as a list of indices corresponding to particles. Also contains ONE particle considered as the best of the neighborhood.
Definition at line 39 of file eoSocialNeighborhood.h.
void eoSocialNeighborhood< POT >::put | ( | unsigned | _oneIndice | ) | [inline, virtual] |
Put a particle (identified by its indice in its population) in the neighborhood.
_oneIndice | - The indice of the particle in its population. |
Implements eoNeighborhood< POT >.
Definition at line 49 of file eoSocialNeighborhood.h.
Referenced by eoLinearTopology< POT >::setup(), and eoRingTopology< POT >::setup().
bool eoSocialNeighborhood< POT >::contains | ( | unsigned | _oneIndice | ) | [inline, virtual] |
Return true if the neighborhood contains the indice (= that means "contains the particle whose indice is _oneIndice")
_oneIndice | - The indice of the particle in its population. |
Implements eoNeighborhood< POT >.
Definition at line 59 of file eoSocialNeighborhood.h.
unsigned eoSocialNeighborhood< POT >::get | ( | unsigned | _index | ) | [inline, virtual] |
Return the "_index-th" particle of the neighborhood.
Throw an exception if its not contained in the neighborhood.
Implements eoNeighborhood< POT >.
Definition at line 90 of file eoSocialNeighborhood.h.
References eoSocialNeighborhood< POT >::size().
POT& eoSocialNeighborhood< POT >::best | ( | ) | [inline, virtual] |
Return the best particle of the neighborhood.
The topology is expected to get it.
Implements eoNeighborhood< POT >.
Definition at line 105 of file eoSocialNeighborhood.h.
Referenced by eoLinearTopology< POT >::setup(), and eoRingTopology< POT >::setup().
void eoSocialNeighborhood< POT >::best | ( | POT | _particle | ) | [inline, virtual] |
Set the best particle of the neighborhood.
The topology is expected to set it.
Implements eoNeighborhood< POT >.
Definition at line 114 of file eoSocialNeighborhood.h.