|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
Logger for printing optimization progress to the console. More...
#include <ConsoleLogger.h>
Public Member Functions | |
| ConsoleLogger (const std::size_t interval) | |
| Constructs a console logger. | |
| void | log (const std::size_t gen, const Population< GeneType > &pop) |
| Prints the current best fitness if the generation matches the interval. | |
Logger for printing optimization progress to the console.
Prints the best fitness found so far at regular generation intervals.
| GeneType | The gene type of the population. |
Definition at line 19 of file ConsoleLogger.h.
|
inlineexplicit |
Constructs a console logger.
| interval | Generation frequency for logging. 0 disables logging. |
Definition at line 28 of file ConsoleLogger.h.
|
inline |
Prints the current best fitness if the generation matches the interval.
| gen | Current generation index. |
| pop | Current population state. |
Definition at line 35 of file ConsoleLogger.h.
References galib::Population< GeneType >::getBestIndividual().