new style peo

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1021 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
canape 2008-02-29 14:08:59 +00:00
commit edb6d65a7b
34 changed files with 407 additions and 386 deletions

View file

@ -55,27 +55,27 @@ template <class POT> class peoPSOSelect: public eoSelectOne<POT>
{
public:
//! @brief Constructor
//! @param eoTopology < POT > & _topology
//! @brief Constructor
//! @param eoTopology < POT > & _topology
peoPSOSelect(eoTopology < POT > & _topology):topology(_topology)
{}
//! @brief typedef : creation of Fitness
//! @brief typedef : creation of Fitness
typedef typename PO < POT >::Fitness Fitness;
//! @brief Virtual operator
//! @param eoPop<POT>& _pop
//! @return POT&
//! @brief Virtual operator
//! @param eoPop<POT>& _pop
//! @return POT&
virtual const POT& operator()(const eoPop<POT>& _pop)
{
return topology.globalBest(_pop);
}
private:
//! @param eoTopology < POT > & topology
//! @param eoTopology < POT > & topology
eoTopology < POT > & topology;
};
//! @class peoGlobalBestVelocity
//! @brief Specific class for a replacement thanks to the velocity migration of a population of a PSO
//! @see eoReplacement
@ -86,18 +86,18 @@ class peoGlobalBestVelocity : public eoReplacement<POT>
{
public:
//! @brief typedef : creation of VelocityType
//! @brief typedef : creation of VelocityType
typedef typename POT::ParticleVelocityType VelocityType;
//! @brief Constructor
//! @param double & _c3
//! @param eoVelocity < POT > &_velocity
//! @brief Constructor
//! @param double & _c3
//! @param eoVelocity < POT > &_velocity
peoGlobalBestVelocity( const double & _c3, eoVelocity < POT > &_velocity): c3 (_c3),velocity (_velocity)
{}
//! @brief Virtual operator
//! @param eoPop<POT>& _dest
//! @param eoPop<POT>& _source
//! @brief Virtual operator
//! @param eoPop<POT>& _dest
//! @param eoPop<POT>& _source
void operator()(eoPop<POT>& _dest, eoPop<POT>& _source)
{
@ -113,12 +113,12 @@ class peoGlobalBestVelocity : public eoReplacement<POT>
}
protected:
//! @param double & c3
//! @param eoVelocity < POT > & velocity
//! @param double & c3
//! @param eoVelocity < POT > & velocity
const double & c3;
eoVelocity < POT > & velocity;
};
//! @class peoWorstPositionReplacement
//! @brief Specific class for a replacement of a population of a PSO
//! @see eoReplacement
@ -127,13 +127,13 @@ class peoGlobalBestVelocity : public eoReplacement<POT>
template <class POT> class peoWorstPositionReplacement : public eoReplacement<POT>
{
public:
//! @brief constructor
//! @brief constructor
peoWorstPositionReplacement()
{}
//! @brief operator
//! @param eoPop<POT>& _dest
//! @param eoPop<POT>& _source
//! @brief operator
//! @param eoPop<POT>& _dest
//! @param eoPop<POT>& _source
void operator()(eoPop<POT>& _dest, eoPop<POT>& _source)
{
unsigned ind=0;