Addition of a method sort for PSO
This commit is contained in:
parent
ef8bc7b03f
commit
2273573e04
4 changed files with 22 additions and 93 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue