#include <eoVectorParticle.h>
Inheritance diagram for eoVectorParticle< FitT, PositionType, VelocityType >:

Public Types | |
| typedef PositionType | AtomType |
| typedef VelocityType | ParticleVelocityType |
Public Member Functions | |
| eoVectorParticle (unsigned _size=0, PositionType position=PositionType(), VelocityType velocity=VelocityType(), PositionType bestPositions=PositionType()) | |
| Default constructor. | |
| void | position (const std::vector< PositionType > &_v) |
| void | resize (unsigned _size) |
| Resize the tree vectors of the particle: positions, velocities and bestPositions. | |
| void | resizeBestPositions (unsigned _size) |
| Resize the best positions. | |
| void | resizeVelocities (unsigned _size) |
| Resize the velocities. | |
Public Attributes | |
| std::vector< PositionType > | bestPositions |
| std::vector< ParticleVelocityType > | velocities |
The positions, velocities and the best positions associated to the particle are stored as vectors. Inheriting from PO and std::vector, tree templates arguments are required: the fitness type (which is also the type of the particle's best fitness), the position type and the velocity type.
Definition at line 22 of file eoVectorParticle.h.
| eoVectorParticle< FitT, PositionType, VelocityType >::eoVectorParticle | ( | unsigned | _size = 0, |
|
| PositionType | position = PositionType (), |
|||
| VelocityType | velocity = VelocityType (), |
|||
| PositionType | bestPositions = PositionType () | |||
| ) | [inline] |
Default constructor.
| _size | Length of the tree vectors (we expect the same size), default is 0 | |
| position | ||
| velocity | ||
| bestPositions |
Definition at line 53 of file eoVectorParticle.h.
| void eoVectorParticle< FitT, PositionType, VelocityType >::resize | ( | unsigned | _size | ) | [inline] |
Resize the tree vectors of the particle: positions, velocities and bestPositions.
| _size | The new size for positions, velocities and bestPositions |
Definition at line 82 of file eoVectorParticle.h.
Referenced by eoVectorParticle< FitT, bool, double >::position().
| void eoVectorParticle< FitT, PositionType, VelocityType >::resizeBestPositions | ( | unsigned | _size | ) | [inline] |
Resize the best positions.
| _size | The new size for the best positions. |
Definition at line 94 of file eoVectorParticle.h.
| void eoVectorParticle< FitT, PositionType, VelocityType >::resizeVelocities | ( | unsigned | _size | ) | [inline] |
Resize the velocities.
| _size | The new size for the velocities. |
Definition at line 104 of file eoVectorParticle.h.
1.4.7