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:
parent
961dcba259
commit
2a102a5cf7
7 changed files with 23 additions and 23 deletions
|
|
@ -43,12 +43,12 @@
|
|||
/**
|
||||
* Container of the neighbor informations
|
||||
*/
|
||||
template< class EOType >
|
||||
template< class EOType, class Fitness=typename EOType::Fitness>
|
||||
class moNeighbor : public eoObject, public eoPersistent
|
||||
{
|
||||
public:
|
||||
typedef EOType EOT;
|
||||
typedef typename EOT::Fitness Fitness;
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
|
|
@ -58,7 +58,7 @@ public:
|
|||
* Copy Constructor
|
||||
* @param _neighbor to copy
|
||||
*/
|
||||
moNeighbor(const moNeighbor<EOT>& _neighbor) {
|
||||
moNeighbor(const moNeighbor<EOT, Fitness>& _neighbor) {
|
||||
repFitness = _neighbor.fitness();
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ public:
|
|||
* @param _neighbor the neighbor to assign
|
||||
* @return a neighbor equal to the other
|
||||
*/
|
||||
virtual moNeighbor<EOT>& operator=(const moNeighbor<EOT>& _neighbor) {
|
||||
virtual moNeighbor<EOT, Fitness>& operator=(const moNeighbor<EOT, Fitness>& _neighbor) {
|
||||
repFitness = _neighbor.fitness();
|
||||
return (*this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue