minor bugs in MO

This commit is contained in:
liefooga 2013-02-22 12:16:37 +01:00
commit 1cd3fd6a30
3 changed files with 146 additions and 137 deletions

View file

@ -73,7 +73,7 @@ public:
nbStep(_nbStep) {
isAccept = false;
if (!neighborhood.isRandom()) {
std::cout << "moRandomNeutralWalkExplorer::Warning -> the neighborhood used is not random" << std::endl;
std::cout << "moRandomNeutralWalkExplorer::Warning -> the neighborhood used is not random (" << neighborhood.className() << ")" << std::endl;
}
}

View file

@ -68,7 +68,7 @@ public:
moRandomWalkExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval) : moNeighborhoodExplorer<Neighbor>(_neighborhood, _eval) {
isAccept = false;
if (!neighborhood.isRandom()) {
std::cout << "moRandomWalkExplorer::Warning -> the neighborhood used is not random" << std::endl;
std::cout << "moRandomNeutralWalkExplorer::Warning -> the neighborhood used is not random (" << neighborhood.className() << ")" << std::endl;
}
}

View file

@ -66,6 +66,7 @@ public:
*/
moBitFlipNeighborhood(double _rate, unsigned _length, unsigned _sampleSize): moNeighborhood<Neighbor>(), rate(_rate), length(_length), sampleSize(_sampleSize) {
nNeighbors = 0;
std::cout << "rate = " << rate << std::endl;
}
/**
@ -136,6 +137,14 @@ public:
return nNeighbors < sampleSize ;
}
/**
* The neighborhood is random here
* @return true, since the neighborhood is random
*/
bool isRandom() {
return true;
}
/**
* Return the class Name
* @return the class name as a std::string