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

@ -39,7 +39,7 @@ template< class EOT >
class moBackwardVariableNeighborhood : public moVariableNeighborhood<EOT>
{
public:
typedef moNeighbor<EOT> Neighbor;
typedef moNeighbor<EOT> Neighbor;
using moVariableNeighborhood<EOT>::currentNH;
using moVariableNeighborhood<EOT>::neighborhoodVector;
@ -63,21 +63,21 @@ public:
* @return true if there is some neighborhood to explore
*/
virtual bool contNeighborhood() {
return (currentNH > 0);
return (currentNH > 0);
}
/**
* put the current neighborhood on the last one
*/
virtual void initNeighborhood() {
currentNH = neighborhoodVector.size() - 1;
currentNH = neighborhoodVector.size() - 1;
}
/**
* put the current neighborhood on the next one
*/
virtual void nextNeighborhood() {
currentNH--;
currentNH--;
}
};

View file

@ -36,13 +36,13 @@ Contact: paradiseo-help@lists.gforge.inria.fr
* Dummy Neighborhood
*/
template< class EOT >
class moDummyNeighbor : public moNeighbor< EOT >{
class moDummyNeighbor : public moNeighbor< EOT > {
public:
/**
* NOTHING TO DO
* @param _solution the related solution
*/
virtual void move(EOT& _solution){}
virtual void move(EOT& _solution) {}
};
#endif

View file

@ -37,7 +37,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
* Dummy Neighborhood
*/
template< class Neighbor >
class moDummyNeighborhood : public moNeighborhood<Neighbor>{
class moDummyNeighborhood : public moNeighborhood<Neighbor> {
public:
typedef typename Neighbor::EOT EOT;
@ -46,8 +46,8 @@ public:
* @param _solution a solution (unused)
* @return always false
*/
virtual bool hasNeighbor(EOT & _solution){
return false;
virtual bool hasNeighbor(EOT & _solution) {
return false;
}
/**
@ -55,22 +55,22 @@ public:
* @param _solution a solution (unused)
* @param _current a neighbor (unused)
*/
virtual void init(EOT & _solution, Neighbor & _current){}
virtual void init(EOT & _solution, Neighbor & _current) {}
/**
* NOTHING TO DO
* @param _solution a solution (unused)
* @param _current a neighbor (unused)
*/
virtual void next(EOT & _solution, Neighbor & _current){}
virtual void next(EOT & _solution, Neighbor & _current) {}
/**
* NOTHING TO DO
* @param _solution a solution (unused)
* @return always false
*/
virtual bool cont(EOT & _solution){
return false;
virtual bool cont(EOT & _solution) {
return false;
}
};

View file

@ -40,7 +40,7 @@ class moForwardVariableNeighborhood : public moVariableNeighborhood<EOT>
{
public:
typedef moNeighbor<EOT> Neighbor;
typedef moNeighbor<EOT> Neighbor;
using moVariableNeighborhood<EOT>::currentNH;
using moVariableNeighborhood<EOT>::neighborhoodVector;
@ -64,21 +64,21 @@ public:
* @return true if there is some neighborhood to explore
*/
virtual bool contNeighborhood() {
return (currentNH < neighborhoodVector.size() - 1);
return (currentNH < neighborhoodVector.size() - 1);
}
/**
* put the current neighborhood on the first one
*/
virtual void initNeighborhood() {
currentNH = 0;
currentNH = 0;
}
/**
* put the current neighborhood on the next one
*/
virtual void nextNeighborhood() {
currentNH++;
currentNH++;
}
};

View file

@ -98,8 +98,8 @@ public:
* @param _neighbor a neighbor
* @return if _neighbor and this one are equals
*/
virtual bool equals(moIndexNeighbor<EOT>& _neighbor){
return (key==_neighbor.index());
virtual bool equals(moIndexNeighbor<EOT>& _neighbor) {
return (key==_neighbor.index());
}
protected:

View file

@ -107,8 +107,8 @@ public:
* @param _neighbor a neighbor
* @return if _neighbor and this one are equals
*/
virtual bool equals(moNeighbor<EOT>& _neighbor){
return false;
virtual bool equals(moNeighbor<EOT>& _neighbor) {
return false;
}
/**

View file

@ -40,9 +40,9 @@ class moRndNeighborhood : virtual public moNeighborhood<Neighbor> {
public:
/**
* @return true
*/
/**
* @return true
*/
bool isRandom() {
return true;
}

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:

View file

@ -43,15 +43,15 @@ class moVariableNeighborhood : public moNeighborhood<moNeighbor<EOT> >
{
public:
typedef moNeighbor<EOT> Neighbor;
typedef moNeighbor<EOT> Neighbor;
/**
* Construction of at least one neighborhood
* @param _firstNH first neighborhood in the vector
*/
moVariableNeighborhood(moNeighborhood<Neighbor>& _firstNH) {
neighborhoodVector.push_back(&_firstNH);
// the current neighborhood
currentNH = 0;
neighborhoodVector.push_back(&_firstNH);
// the current neighborhood
currentNH = 0;
}
/**
@ -67,7 +67,7 @@ public:
* @return if _solution has a Neighbor in the current neighborhood
*/
virtual bool hasNeighbor(EOT & _solution) {
return neighborhoodVector[currentNH]->hasNeighbor(_solution);
return neighborhoodVector[currentNH]->hasNeighbor(_solution);
}
/**
@ -76,7 +76,7 @@ public:
* @param _current the first neighbor in the current neighborhood
*/
virtual void init(EOT & _solution, Neighbor & _current) {
neighborhoodVector[currentNH]->init(_solution, _current);
neighborhoodVector[currentNH]->init(_solution, _current);
}
/**
@ -85,7 +85,7 @@ public:
* @param _current the next neighbor in the current neighborhood
*/
virtual void next(EOT & _solution, Neighbor & _current) {
neighborhoodVector[currentNH]->next(_solution, _current);
neighborhoodVector[currentNH]->next(_solution, _current);
}
/**
@ -94,7 +94,7 @@ public:
* @return if there is still a neighbor not explored in the current neighborhood
*/
virtual bool cont(EOT & _solution) {
return neighborhoodVector[currentNH]->cont(_solution);
return neighborhoodVector[currentNH]->cont(_solution);
}
/**
@ -110,7 +110,7 @@ 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);
neighborhoodVector.push_back(&_nh);
}
/**