Rectification des templates dans les VariableNeighborhood

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1731 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-04-02 15:50:55 +00:00
commit e3a9101595
2 changed files with 12 additions and 18 deletions

View file

@ -35,23 +35,20 @@ Contact: paradiseo-help@lists.gforge.inria.fr
/**
* A variable Neighborhood Search (VNS) in the Backward manner
*/
template< class Neighbor >
class moBackwardVariableNeighborhood : public moVariableNeighborhood<Neighbor>
template< class EOT, class Fitness >
class moBackwardVariableNeighborhood : public moVariableNeighborhood<EOT, Fitness>
{
public:
/**
* Define type of a solution corresponding to Neighbor
*/
typedef typename Neighbor::EOT EOT;
typedef moNeighbor<EOT, Fitness> Neighbor;
using moVariableNeighborhood::currentNH;
using moVariableNeighborhood::neighborhoodVector;
using moVariableNeighborhood<EOT, Fitness>::currentNH;
using moVariableNeighborhood<EOT, Fitness>::neighborhoodVector;
/**
* Construction of at least one neighborhood
* @param _firstNH first neighborhood in the vector
*/
moBackwardVariableNeighborhood(moNeighborhood<Neighbor>& _firstNH) : moVariableNeighborhood<Neighbor>(_firstNH) { }
moBackwardVariableNeighborhood(moNeighborhood<Neighbor>& _firstNH) : moVariableNeighborhood<EOT, Fitness>(_firstNH) { }
/**
* Return the class id.

View file

@ -36,23 +36,20 @@ Contact: paradiseo-help@lists.gforge.inria.fr
/**
* A variable Neighborhood Search (VNS) in the random manner
*/
template< class Neighbor >
class moRndVariableNeighborhood : public moVariableNeighborhood<Neighbor>
template< class EOT, class Fitness >
class moRndVariableNeighborhood : public moVariableNeighborhood<EOT, Fitness>
{
public:
/**
* Define type of a solution corresponding to Neighbor
*/
typedef typename Neighbor::EOT EOT;
typedef moNeighbor<EOT, Fitness> Neighbor;
using moVariableNeighborhood::currentNH;
using moVariableNeighborhood::neighborhoodVector;
using moVariableNeighborhood<EOT, Fitness>::currentNH;
using moVariableNeighborhood<EOT, Fitness>::neighborhoodVector;
/**
* Construction of at least one neighborhood
* @param _firstNH first neighborhood in the vector
*/
moRndVariableNeighborhood(moNeighborhood<Neighbor>& _firstNH) : moVariableNeighborhood<Neighbor>(_firstNH) {
moRndVariableNeighborhood(moNeighborhood<Neighbor>& _firstNH) : moVariableNeighborhood<EOT, Fitness>(_firstNH) {
indexVector.push_back(0);
}