From e3a9101595ba1608b683483f3da8d8b66ebb5b00 Mon Sep 17 00:00:00 2001 From: jhumeau Date: Fri, 2 Apr 2010 15:50:55 +0000 Subject: [PATCH] Rectification des templates dans les VariableNeighborhood git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1731 331e1502-861f-0410-8da2-ba01fb791d7f --- .../neighborhood/moBackwardVariableNeighborhood.h | 15 ++++++--------- .../src/neighborhood/moRndVariableNeighborhood.h | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/trunk/paradiseo-mo/src/neighborhood/moBackwardVariableNeighborhood.h b/trunk/paradiseo-mo/src/neighborhood/moBackwardVariableNeighborhood.h index 25978990d..d9ecdf504 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moBackwardVariableNeighborhood.h +++ b/trunk/paradiseo-mo/src/neighborhood/moBackwardVariableNeighborhood.h @@ -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 +template< class EOT, class Fitness > +class moBackwardVariableNeighborhood : public moVariableNeighborhood { public: - /** - * Define type of a solution corresponding to Neighbor - */ - typedef typename Neighbor::EOT EOT; + typedef moNeighbor Neighbor; - using moVariableNeighborhood::currentNH; - using moVariableNeighborhood::neighborhoodVector; + using moVariableNeighborhood::currentNH; + using moVariableNeighborhood::neighborhoodVector; /** * Construction of at least one neighborhood * @param _firstNH first neighborhood in the vector */ - moBackwardVariableNeighborhood(moNeighborhood& _firstNH) : moVariableNeighborhood(_firstNH) { } + moBackwardVariableNeighborhood(moNeighborhood& _firstNH) : moVariableNeighborhood(_firstNH) { } /** * Return the class id. diff --git a/trunk/paradiseo-mo/src/neighborhood/moRndVariableNeighborhood.h b/trunk/paradiseo-mo/src/neighborhood/moRndVariableNeighborhood.h index e6d3fd83e..e0c32050e 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moRndVariableNeighborhood.h +++ b/trunk/paradiseo-mo/src/neighborhood/moRndVariableNeighborhood.h @@ -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 +template< class EOT, class Fitness > +class moRndVariableNeighborhood : public moVariableNeighborhood { public: - /** - * Define type of a solution corresponding to Neighbor - */ - typedef typename Neighbor::EOT EOT; + typedef moNeighbor Neighbor; - using moVariableNeighborhood::currentNH; - using moVariableNeighborhood::neighborhoodVector; + using moVariableNeighborhood::currentNH; + using moVariableNeighborhood::neighborhoodVector; /** * Construction of at least one neighborhood * @param _firstNH first neighborhood in the vector */ - moRndVariableNeighborhood(moNeighborhood& _firstNH) : moVariableNeighborhood(_firstNH) { + moRndVariableNeighborhood(moNeighborhood& _firstNH) : moVariableNeighborhood(_firstNH) { indexVector.push_back(0); }