Passage du code dans un pretty printer

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1813 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-05-17 14:56:42 +00:00
commit 3d8057ac4d
88 changed files with 2726 additions and 2720 deletions

View file

@ -40,7 +40,7 @@ template< class EOT, class Fitness >
class moRndVariableNeighborhood : public moVariableNeighborhood<EOT, Fitness>
{
public:
typedef moNeighbor<EOT, Fitness> Neighbor;
typedef moNeighbor<EOT, Fitness> Neighbor;
using moVariableNeighborhood<EOT, Fitness>::currentNH;
using moVariableNeighborhood<EOT, Fitness>::neighborhoodVector;
@ -50,7 +50,7 @@ public:
* @param _firstNH first neighborhood in the vector
*/
moRndVariableNeighborhood(moNeighborhood<Neighbor>& _firstNH) : moVariableNeighborhood<EOT, Fitness>(_firstNH) {
indexVector.push_back(0);
indexVector.push_back(0);
}
/**
@ -58,8 +58,8 @@ public:
* @param _nh the neighborhood to add at the end of the vector of neighborhood
*/
virtual void add(moNeighborhood<Neighbor>& _nh) {
neighborhoodVector.push_back(_nh);
indexVector.push_back(indexVector.size());
neighborhoodVector.push_back(_nh);
indexVector.push_back(indexVector.size());
}
@ -76,24 +76,24 @@ public:
* @return true if there is some neighborhood to explore
*/
virtual bool contNeighborhood() {
return (index < neighborhoodVector.size() - 1);
return (index < neighborhoodVector.size() - 1);
}
/**
* put the current neighborhood on the first one
*/
virtual void initNeighborhood() {
std::random_shuffle(indexVector.begin(), indexVector.end());
index = 0;
currentNH = indexVector[index];
std::random_shuffle(indexVector.begin(), indexVector.end());
index = 0;
currentNH = indexVector[index];
}
/**
* put the current neighborhood on the next one
*/
virtual void nextNeighborhood() {
index++;
currentNH = indexVector[index];
index++;
currentNH = indexVector[index];
}
private: