debug erreur reconnu par le compilateur de Visual Studio

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1860 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-06-21 15:29:13 +00:00
commit 7b8b687bd4
4 changed files with 7 additions and 5 deletions

View file

@ -61,14 +61,14 @@ public:
unsigned int offset = n * k; unsigned int offset = n * k;
unsigned int j = 0; unsigned int j = 0;
while (_solution[offset + j] && j < k) j++; while (j < k && _solution[offset + j]) j++;
if (j == k) // the block is complete, so the fitness decreases from one if (j == k) // the block is complete, so the fitness decreases from one
_neighbor.fitness(_solution.fitness() - 1); _neighbor.fitness(_solution.fitness() - 1);
else { else {
if ((_solution[_neighbor.index()] == 0) && (offset + j == _neighbor.index())) { // can the block be filled? if ((_solution[_neighbor.index()] == 0) && (offset + j == _neighbor.index())) { // can the block be filled?
j++; // next bit j++; // next bit
while (_solution[offset + j] && j < k) j++; while ( j < k && _solution[offset + j]) j++;
if (j == k) // the block can be filled, so the fitness increases from one if (j == k) // the block can be filled, so the fitness increases from one
_neighbor.fitness(_solution.fitness() + 1); _neighbor.fitness(_solution.fitness() + 1);

View file

@ -97,7 +97,7 @@ class moeoObjectiveVectorNormalizer
* @param max_param worst vector is set to it * @param max_param worst vector is set to it
* @return a scale to use with the normalizer * @return a scale to use with the normalizer
*/ */
static Scale make_scale_from_pop(eoPop<MOEOT> &_pop, Type &max_param=100){ static Scale make_scale_from_pop(eoPop<MOEOT> &_pop, Type max_param=100){
Scale res; Scale res;
if (_pop.empty()) { if (_pop.empty()) {
std::cout<<"makeScale in moeoObjectiveVEctorNormalizer.h: pop is empty"<<std::endl; std::cout<<"makeScale in moeoObjectiveVEctorNormalizer.h: pop is empty"<<std::endl;

View file

@ -60,7 +60,9 @@ public:
// the variables are numbered from 1 to nbVar // the variables are numbered from 1 to nbVar
variables = new vector<int>[nbVar + 1]; variables = new vector<int>[nbVar + 1];
int var[nbVar]; //int var[nbVar];
std::vector<int> var;
var.resize(nbVar);
unsigned i, j, ind; unsigned i, j, ind;
// to selected nbLitteral different variables in the clauses // to selected nbLitteral different variables in the clauses

View file

@ -61,7 +61,7 @@ public:
offset = i * k; offset = i * k;
j = 0; j = 0;
while (_solution[offset + j] && j < k) j++; while (j < k && _solution[offset + j]) j++;
if (j == k) if (j == k)
sum++; sum++;