#include <eoVectorParticle.h>

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. | |
| bool | operator< (const eoVectorParticle< FitT, PositionType, VelocityType > &_eo) const |
| to avoid conflicts between EA and PSO | |
| virtual void | printOn (std::ostream &os) const |
| Print-on a vector-particle. | |
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 36 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 67 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 96 of file eoVectorParticle.h.
| void eoVectorParticle< FitT, PositionType, VelocityType >::resizeBestPositions | ( | unsigned | _size | ) | [inline] |
Resize the best positions.
| _size | The new size for the best positions. |
Definition at line 108 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 118 of file eoVectorParticle.h.
1.5.5