|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
#include <StandardGA.h>
Public Member Functions | |
| StandardGA (FitnessFunction< GeneType > &ff, std::unique_ptr< Selection< GeneType > > sel, std::unique_ptr< Mutation< GeneType > > mu, std::unique_ptr< Crossover< GeneType > > cs, double m_rate, double c_rate, std::size_t max_gen, bool elitism=true, std::size_t threads=1) | |
| void | run (Population< GeneType > &population) override |
| Executes the optimization process on the given population. | |
Public Member Functions inherited from galib::Algorithm< GeneType > | |
| virtual | ~Algorithm ()=default |
| virtual void | enableConsoleLogging (const std::size_t interval) |
| Enables logging of progress to the standard output. | |
| virtual void | enableFileLogging (const std::string &path, std::size_t interval) |
| Enables logging of population snapshots to a CSV file. | |
| virtual void | enableLogging (const std::string &) |
| Placeholder for generic logging configuration. | |
Additional Inherited Members | |
Protected Member Functions inherited from galib::Algorithm< GeneType > | |
| void | notifyLoggers (std::size_t gen, const Population< GeneType > &pop) |
| Notifies all active loggers to record the current state. | |
Protected Attributes inherited from galib::Algorithm< GeneType > | |
| std::unique_ptr< utils::ConsoleLogger< GeneType > > | console_logger_m |
| std::unique_ptr< utils::FileLogger< GeneType > > | file_logger_m |
Definition at line 25 of file StandardGA.h.
|
inline |
Definition at line 49 of file StandardGA.h.
|
inlineoverridevirtual |
Executes the optimization process on the given population.
This is a pure-virtual method that must be implemented by concrete algorithms (e.g., StandardGA, IslandGA).
| population | The population to optimize. Modified in-place. |
Implements galib::Algorithm< GeneType >.
Definition at line 68 of file StandardGA.h.
References galib::Algorithm< GeneType >::console_logger_m, galib::Population< GeneType >::empty(), galib::Population< GeneType >::getBestIndividual(), galib::Population< GeneType >::getNumGenes(), galib::Algorithm< GeneType >::notifyLoggers(), and galib::Population< GeneType >::size().