Addition of a method sort for PSO

This commit is contained in:
paradiseo 2008-01-24 08:35:11 +00:00
commit 2273573e04
4 changed files with 22 additions and 93 deletions

View file

@ -119,6 +119,15 @@ public:
{
velocities.resize (_size);
}
/// to avoid conflicts between EA and PSO
bool operator<(const eoVectorParticle<FitT, PositionType, VelocityType >& _eo) const
{
if (_eo.best() > this->best())
return true;
else
return false;
}
/**
* Print-on a vector-particle