minor bugs in MO
This commit is contained in:
parent
ca44e95add
commit
1cd3fd6a30
3 changed files with 146 additions and 137 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef _moBitFlipNeighborhood_h
|
||||
#define _moBitFlipNeighborhood_h
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue