Dans les "neighbors": Ajout d'un template Fitness avec comme valeur par défaut EOT::Fitness.

Utile pour la compatibilité avec MOEO ou Fitness doit être un Objective Vector

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1816 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-05-18 09:17:13 +00:00
commit 2a102a5cf7
7 changed files with 23 additions and 23 deletions

View file

@ -35,12 +35,12 @@ Contact: paradiseo-help@lists.gforge.inria.fr
/**
* Indexed Shift Neighbor
*/
template <class EOT>
class moShiftNeighbor: public moIndexNeighbor<EOT>
template <class EOT, class Fitness=typename EOT::Fitness>
class moShiftNeighbor: public moIndexNeighbor<EOT, Fitness>
{
public:
using moIndexNeighbor<EOT>::key;
using moIndexNeighbor<EOT, Fitness>::key;
/**
* Apply move on a solution regarding a key

View file

@ -36,8 +36,8 @@ Contact: paradiseo-help@lists.gforge.inria.fr
/**
* Swap Neighbor
*/
template <class EOT>
class moSwapNeighbor: public moBackableNeighbor<EOT>
template <class EOT, class Fitness=typename EOT::Fitness>
class moSwapNeighbor: public moBackableNeighbor<EOT, Fitness>
{
public:

View file

@ -36,11 +36,11 @@ Contact: paradiseo-help@lists.gforge.inria.fr
/**
* Swap Neighborhood
*/
template <class EOT>
class moSwapNeighborhood : public moNeighborhood<moSwapNeighbor<EOT> >
template <class EOT, class Fitness=typename EOT::Fitness>
class moSwapNeighborhood : public moNeighborhood<moSwapNeighbor<EOT, Fitness> >
{
public:
typedef moSwapNeighbor<EOT> Neighbor;
typedef moSwapNeighbor<EOT, Fitness> Neighbor;
/**
* @return if there are available Neighbor