Records a set of best-so-far individuals. More...
#include <HallOfFame.h>
Public Member Functions | |
| bool | initialize (StateP) |
| Perform initialization. Called before Operator::operate. By default, if the return value is false, the operator will not be used! | |
| bool | operate (StateP) |
| Collect best individuals of the whole Population. | |
| bool | operate (const std::vector< IndividualP > &) |
| Collect best individuals of the given vector. | |
| void | write (XMLNode &) |
| Write operator state to XMLNode or the Registry. Called after Operator::initialize. | |
| void | read (XMLNode &) |
| Read operator state from XMLNode or the Registry. Called after Operator::initialize. | |
| std::vector< IndividualP > | getBest () |
| Get HoF contents (vector of best-so-far individuals). | |
| uint | getLastChange () |
| Return generation of last update (of newest individual in HoF). | |
Protected Attributes | |
| bool | bEmpty_ |
| is HoF empty | |
| StateP | state_ |
| uint | lastChangeGen_ |
| generation of last update | |
| uint | hofSize_ |
| no. of individuals in HoF | |
| std::vector< IndividualP > | bestIndividuals_ |
| vector of individuals in HoF | |
| std::vector< uint > | bestGenerations_ |
| SelBestOpP | selectBest_ |
Records a set of best-so-far individuals.
Currently only one individual is kept. Each Deme contains a HoF object.
Definition at line 13 of file HallOfFame.h.
| bool HallOfFame::initialize | ( | StateP | ) | [virtual] |
Perform initialization. Called before Operator::operate. By default, if the return value is false, the operator will not be used!
Reimplemented from Operator.
Definition at line 16 of file HallOfFame.cpp.
1.7.1