refactor(mo): use clog instead of cout & use at accessors in Debug builds
Should really use eo::log, but waiting for logger refactoring.
This commit is contained in:
parent
5a7fdf7ed3
commit
9cb60e4b10
13 changed files with 38 additions and 19 deletions
|
|
@ -84,7 +84,7 @@ public:
|
|||
bool res = (cpt < maxNoImprove);
|
||||
|
||||
if (!res && verbose)
|
||||
std::cout << "STOP in moBestNoImproveContinuator: Reached maximum number of iterations without improvement [" << cpt << "/" << maxNoImprove << "]" << std::endl;
|
||||
std::clog << "STOP in moBestNoImproveContinuator: Reached maximum number of iterations without improvement [" << cpt << "/" << maxNoImprove << "]" << std::endl;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
cpt++;
|
||||
res = (cpt < maxIter);
|
||||
if (!res && verbose)
|
||||
std::cout << "STOP in moIterContinuator: Reached maximum number of iterations [" << cpt << "/" << maxIter << "]" << std::endl;
|
||||
std::clog << "STOP in moIterContinuator: Reached maximum number of iterations [" << cpt << "/" << maxIter << "]" << std::endl;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public :
|
|||
neighborhood(_neighborhood), eval(_eval)
|
||||
{
|
||||
if (!neighborhood.isRandom()) {
|
||||
std::cout << "moNeighborFitnessStat::Warning -> the neighborhood used is not random, the neighbor will not be random" << std::endl;
|
||||
std::clog << "moNeighborFitnessStat::Warning -> the neighborhood used is not random, the neighbor will not be random" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public:
|
|||
time_t elapsed = (time_t) difftime(time(NULL), start);
|
||||
res = (elapsed < max);
|
||||
if (!res && verbose)
|
||||
std::cout << "STOP in moTimeContinuator: Reached maximum time [" << elapsed << "/" << max << "]" << std::endl;
|
||||
std::clog << "STOP in moTimeContinuator: Reached maximum time [" << elapsed << "/" << max << "]" << std::endl;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue