Debug neighborTabuList, index was not initialized

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1836 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-05-27 14:48:44 +00:00
commit c51f7a8962
2 changed files with 6 additions and 23 deletions

View file

@ -48,7 +48,7 @@ public:
* @param _maxSize maximum size of the tabu list
* @param _howlong how many iteration a move is tabu (0 -> no limits)
*/
moNeighborVectorTabuList(unsigned int _maxSize, unsigned int _howlong) : maxSize(_maxSize), howlong(_howlong) {
moNeighborVectorTabuList(unsigned int _maxSize, unsigned int _howlong) : maxSize(_maxSize), howlong(_howlong), index(0) {
tabuList.reserve(_maxSize);
tabuList.resize(0);
}
@ -119,7 +119,7 @@ public:
void print(){
std::cout << "TAbulist:" << std::endl;
for(int i=0; i<tabuList.size(); i++)
std::cout << i << ": " << tabuList[0].first.index() << std::endl;
std::cout << i << ": " << tabuList[i].first.index() << std::endl;
}