Records a set of best-so-far individuals. More...
#include <HallOfFame.h>
Public Member Functions | |
| bool | initialize (StateP) |
| bool | operate (StateP) |
| perform the designated operation | |
| bool | operate (const std::vector< IndividualP > &) |
| void | write (XMLNode &) |
| void | read (XMLNode &) |
| std::vector< IndividualP > | getBest () |
| uint | getLastChange () |
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_ |
| std::vector< uint > | bestGenerations_ |
| SelBestOpP | selectBest_ |
Records a set of best-so-far individuals.
Currently only one individual is kept. Each deme is assigned a HoF object.
Definition at line 12 of file HallOfFame.h.
| std::vector<IndividualP> HallOfFame::getBest | ( | ) | [inline] |
Get HoF contents (vector of best-so-far individuals)
Definition at line 34 of file HallOfFame.h.
| uint HallOfFame::getLastChange | ( | ) | [inline] |
Return generation of last update (of newest individual in HoF)
Definition at line 40 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 14 of file HallOfFame.cpp.
| void HallOfFame::read | ( | XMLNode & | ) | [virtual] |
Read operator state from XMLNode or the Registry. Called after Operator::initialize.
Reimplemented from Operator.
Definition at line 76 of file HallOfFame.cpp.
| void HallOfFame::write | ( | XMLNode & | ) | [virtual] |
Write operator state to XMLNode or the Registry. Called after Operator::initialize.
Reimplemented from Operator.
Definition at line 60 of file HallOfFame.cpp.
1.7.1