eoSocialNeighborhood< POT > Class Template Reference

Derivated from eoNeighborhood. More...

#include <eoSocialNeighborhood.h>

Inheritance diagram for eoSocialNeighborhood< POT >:

eoNeighborhood< POT >

List of all members.

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


Detailed Description

template<class POT>
class eoSocialNeighborhood< POT >

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 37 of file eoSocialNeighborhood.h.


Member Function Documentation

template<class POT>
void eoSocialNeighborhood< POT >::put ( unsigned  _oneIndice  )  [inline, virtual]

Put a particle (identified by its indice in its population) in the neighborhood.

Parameters:
_oneIndice - The indice of the particle in its population.

Implements eoNeighborhood< POT >.

Definition at line 47 of file eoSocialNeighborhood.h.

Referenced by eoRingTopology< POT >::setup(), and eoLinearTopology< POT >::setup().

template<class POT>
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").

Parameters:
_oneIndice - The indice of the particle in its population.

Implements eoNeighborhood< POT >.

Definition at line 57 of file eoSocialNeighborhood.h.

template<class POT>
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 88 of file eoSocialNeighborhood.h.

References eoSocialNeighborhood< POT >::size().

template<class POT>
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 103 of file eoSocialNeighborhood.h.

Referenced by eoRingTopology< POT >::setup(), and eoLinearTopology< POT >::setup().

template<class POT>
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 112 of file eoSocialNeighborhood.h.


The documentation for this class was generated from the following file:

Generated on Thu Jan 1 23:19:50 2009 for EvolvingObjects by  doxygen 1.5.5